changelog update #157
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
| name: "Release a tag" | |
| on: | |
| push: | |
| tags: | |
| - v* | |
| jobs: | |
| release: | |
| runs-on: ubuntu-latest | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GORELEASER_GITHUB_TOKEN }} | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install Go | |
| uses: actions/setup-go@v2 | |
| with: | |
| go-version: 1.24 | |
| - name: Unshallow | |
| run: git fetch --prune --unshallow | |
| - name: Install git-chglog | |
| uses: jaxxstorm/action-install-gh-release@v1.2.0 | |
| with: # Grab the latest version | |
| repo: git-chglog/git-chglog | |
| - name: Login to Docker Hub | |
| uses: docker/login-action@v1 | |
| with: | |
| username: ${{ secrets.DOCKER_HUB_USERNAME }} | |
| password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }} | |
| - name: Create changelog for release | |
| run: | | |
| git-chglog --template .chglog/CHANGELOG.release.tpl.md -o /tmp/changelog ${GITHUB_REF/refs\/tags\//} | |
| - name: Create release | |
| uses: goreleaser/goreleaser-action@v2 | |
| with: | |
| version: latest | |
| args: release --release-notes=/tmp/changelog | |
| - name: Update version in package.json | |
| run: | | |
| sudo apt-get install jq | |
| jq '.version = $newVal' --arg newVal ${GITHUB_REF/refs\/tags\/v/} package.json > tmp.$$.json && mv tmp.$$.json package.json | |
| - uses: JS-DevTools/npm-publish@v1 | |
| with: | |
| token: ${{ secrets.NPM_TOKEN }} |