Auto-open most recent tracking point popup after load #6
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
| # Creates an annotated tag on pushes to master where package.json version | |
| # has changed. Pairs with the manual release workflow for auto-tagging. | |
| # | |
| # Adapted from @ogis/icons publish.yml pattern. | |
| name: Release | |
| on: | |
| push: | |
| branches: | |
| - master | |
| permissions: | |
| contents: write | |
| jobs: | |
| tag: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 2 | |
| - name: Check if version changed | |
| id: version | |
| run: | | |
| if git diff HEAD~1 HEAD -- package.json | grep -q '"version"'; then | |
| echo "changed=true" >> $GITHUB_OUTPUT | |
| else | |
| echo "changed=false" >> $GITHUB_OUTPUT | |
| fi | |
| - name: Extract version from package.json | |
| id: extract | |
| if: steps.version.outputs.changed == 'true' | |
| run: | | |
| VERSION=v$(node -p "require('./package.json').version") | |
| echo "tag=$VERSION" >> $GITHUB_OUTPUT | |
| - name: Create annotated tag | |
| id: tag | |
| if: steps.version.outputs.changed == 'true' | |
| run: | | |
| git config user.name "github-actions" | |
| git config user.email "github-actions@github.com" | |
| TAG="${{ steps.extract.outputs.tag }}" | |
| git tag -a "$TAG" -m "Release $TAG" | |
| git push origin "$TAG" | |
| echo "tag=$TAG" >> $GITHUB_OUTPUT | |
| - name: Create GitHub Release | |
| if: steps.version.outputs.changed == 'true' | |
| env: | |
| GH_TOKEN: ${{ github.token }} | |
| run: | | |
| gh release create "${{ steps.tag.outputs.tag }}" \ | |
| --title "${{ steps.tag.outputs.tag }}" \ | |
| --generate-notes \ | |
| --verify-tag |