Release v1.17.0 (#590) #56
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: release | |
on: | |
push: | |
branches: [ main ] | |
paths: [ CHANGELOG.md ] | |
jobs: | |
release: | |
runs-on: ubuntu-20.04 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Setup Go | |
uses: actions/setup-go@v5 | |
with: | |
go-version: 1.21 | |
- name: Setup NPM | |
uses: actions/setup-node@v4 | |
with: | |
node-version: '20.x' | |
registry-url: 'https://registry.npmjs.org' | |
- name: Login to GitHub Container Registry | |
uses: docker/[email protected] | |
with: | |
registry: ghcr.io | |
username: ${{ github.repository_owner }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: Add env vars | |
run: | | |
echo GORELEASER_CURRENT_TAG=$(go run main.go latest) >> $GITHUB_ENV | |
echo RELEASE_NOTES_PATH=.changes/$(go run main.go latest).md >> $GITHUB_ENV | |
- name: Run GoReleaser | |
uses: goreleaser/[email protected] | |
with: | |
version: latest | |
args: --clean --release-notes=${{ env.RELEASE_NOTES_PATH }} --skip=validate --verbose | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
WINGET_PAT: ${{ secrets.WINGET_PAT }} | |
- name: Publish to NPM | |
run: | | |
node npm/prepare-release.mjs | |
npm publish --access public | |
env: | |
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} | |
- name: Setup Hugo | |
uses: peaceiris/[email protected] | |
with: | |
hugo-version: 'latest' | |
extended: true | |
- name: Build docs | |
run: | | |
go run main.go gen | |
awk 'NR > 1' CHANGELOG.md >> docs/content/guide/changelog/index.md | |
hugo --minify -s docs -b https://changie.dev/ | |
- name: Deploy docs | |
uses: peaceiris/[email protected] | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
publish_dir: ./docs/public | |
cname: changie.dev |