Update publish.yml #61
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI | |
on: | |
push: | |
branches: | |
- release-branch | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Install dependencies | |
run: npm install | |
- name: Update version and changelog | |
run: npx semantic-release --dry-run | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
- name: Package VSIX | |
run: npx vsce package | |
- uses: actions/upload-artifact@v2 | |
with: | |
name: VSIX | |
path: "*.vsix" | |
- name: Commit new version and changelog | |
run: | | |
git config --global user.email "actions@github.com" | |
git config --global user.name "github-actions" | |
git add package.json CHANGELOG.md | |
git commit -m "chore: Update version & changelog. [skip ci]" | |
- name: Push changes | |
uses: ad-m/github-push-action@v0.6.0 | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
- name: Rename VSIX | |
run: mv *.vsix code4z.vsix | |
- name: Run semantic-release | |
run: npx semantic-release | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
- name: Publish | |
run: npx vsce publish | |
env: | |
VSCE_PAT: $ |