Release v1.20.0 (#710) #61
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.22 | |
- 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 }} | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: 3.x | |
- run: echo "cache_id=$(date --utc '+%V')" >> $GITHUB_ENV | |
- uses: actions/cache@v4 | |
with: | |
key: mkdocs-material-${{ env.cache_id }} | |
path: .cache | |
restore-keys: | | |
mkdocs-material- | |
- name: Publish to NPM | |
run: | | |
node npm/prepare-release.mjs | |
npm publish --access public | |
env: | |
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} | |
- name: Build docs | |
run: | | |
go run main.go gen | |
pip install -r requirements.txt | |
mkdocs build | |
- name: Deploy docs | |
uses: peaceiris/[email protected] | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
publish_dir: ./site | |
cname: changie.dev |