diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..c275385 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,39 @@ +name: Release + +on: + workflow_dispatch: + inputs: + version: + description: "Release version" + required: true + type: string + +permissions: + contents: write + +jobs: + release: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + with: + fetch-depth: 0 + + - name: Setup NodeJS + uses: actions/setup-node@v3 + + - name: Configure Git + run: | + git config --global user.name "github-actions[bot]" + git config --global user.email "github-actions[bot]@users.noreply.github.com" + + - name: Generate Changelog and GH Release + run: | + npx changelogen@latest --release --push -r ${{ inputs.version }} + npx changelogen@latest gh release + + - name: Release VS Code Package + env: + VSCE_PAT: ${{ secrets.VSCE_PAT }} + run: | + npx vsce@latest publish diff --git a/changelog.config.json b/changelog.config.json new file mode 100644 index 0000000..d1a1dbf --- /dev/null +++ b/changelog.config.json @@ -0,0 +1,5 @@ +{ + "templates": { + "commitMessage": "release: `v{{newVersion}}`" + } +}