Release v4.0.6 #23
Workflow file for this run
This file contains hidden or 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
| ################################################################################################ | |
| # Copyright (c) Rowe Wilson Frederisk Holme. All rights reserved. | |
| # Licensed under the MIT License. See License.txt in the project root for license information. | |
| ################################################################################################ | |
| --- | |
| name: "MarketsPublish" | |
| on: | |
| # Start action after pushing a tag that starts with "v" (e.g., v1.0.0) | |
| push: | |
| tags: | |
| - 'v*' | |
| # Start action after created a release | |
| # release: | |
| # types: | |
| # - created | |
| # Allows you to run this workflow manually from the Actions tab | |
| workflow_dispatch: | |
| # A workflow run is made up of one or more jobs that can run sequentially or in parallel | |
| jobs: | |
| # This workflow contains a single job called "build" | |
| build: | |
| # The type of runner that the job will run on | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Install Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: '22' | |
| cache: yarn | |
| - name: Extract Release Notes | |
| run: | | |
| awk '/^## Release Notes/{flag=1; next} /^## /{flag=0} flag' README.md > release-notes.md | |
| - name: Build | |
| run: | | |
| npm install -g yarn semver @vscode/vsce ovsx | |
| yarn install | |
| - name: Test | |
| run: xvfb-run -a yarn test | |
| - name: Package VSIX | |
| run: | | |
| vsce package --yarn | |
| echo "VSIX_FILE=$(ls *.vsix | head -n 1)" >> $GITHUB_ENV | |
| - name: Publish to VSCE | |
| if: ${{ success() && startsWith(github.ref, 'refs/tags/v') }} | |
| run: vsce publish --packagePath ${{ env.VSIX_FILE }} | |
| env: | |
| VSCE_PAT: ${{ secrets.VSCE_PAT }} | |
| - name: Publish to OVSX | |
| if: ${{ success() && startsWith(github.ref, 'refs/tags/v') }} | |
| run: ovsx publish ${{ env.VSIX_FILE }} | |
| env: | |
| OVSX_PAT: ${{ secrets.OVSX_PAT }} | |
| - name: Create GitHub Release | |
| if: ${{ success() && startsWith(github.ref, 'refs/tags/v') }} | |
| uses: softprops/action-gh-release@v2 | |
| with: | |
| name: "Wikitext Extension for VSCode ${{ github.ref_name }}" | |
| body_path: release-notes.md | |
| files: ${{ env.VSIX_FILE }} | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |