Skip to content

Release v0.2.2

Release v0.2.2 #32

Workflow file for this run

name: Release
on:
release:
types:
- published
jobs:
changelog:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 100 # fetch the last 100 commits (in other words, releases should happen less than 100 commits apart)
- name: Fetch git tags
run: git fetch --tags -f origin
- name: Find previously released tag
id: git-since-tag
run: |
echo "::set-output name=tag::$(git describe --abbrev=0 --tags $(git rev-list --tags --skip=1 --max-count=1))"
- name: Generate release changelog
id: generate-release-changelog
uses: heinrichreimer/[email protected]
with:
token: ${{ secrets.GITHUB_TOKEN }}
sinceTag: ${{ steps.git-since-tag.outputs.tag }}
output: NEW_CHANGES.md
stripGeneratorNotice: true
- name: Append existing changelog to new changes file
run: |
cp NEW_CHANGES.md NEW_CHANGES.md.tmp
sed '1d' CHANGELOG.md >> NEW_CHANGES.md.tmp
mv NEW_CHANGES.md.tmp CHANGELOG.md
- name: Commit changes to changelog
uses: stefanzweifel/git-auto-commit-action@v4
with:
branch: main
create_branch: false
file_pattern: CHANGELOG.md
commit_message: Update changelog ${{ github.event.release.tag_name }}
commit_options: "--no-verify --signoff"
publish:
needs: changelog
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
ref: main
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: 18
- name: Install dependencies
run: yarn
- name: Publish
run: yarn vsce publish -p ${{ secrets.VSCE_TOKEN }}