chore: refine context docs and UI tone #17
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 | |
| "on": | |
| push: | |
| tags: | |
| - "v*" | |
| permissions: | |
| contents: write | |
| jobs: | |
| build: | |
| name: Build ${{ matrix.goos }}/${{ matrix.goarch }} | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - goos: linux | |
| goarch: amd64 | |
| - goos: linux | |
| goarch: arm64 | |
| - goos: darwin | |
| goarch: amd64 | |
| - goos: darwin | |
| goarch: arm64 | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Set up Go | |
| uses: actions/setup-go@v5 | |
| with: | |
| go-version-file: go.mod | |
| cache: true | |
| - name: Build archive | |
| shell: bash | |
| env: | |
| GOOS: ${{ matrix.goos }} | |
| GOARCH: ${{ matrix.goarch }} | |
| CGO_ENABLED: "0" | |
| run: | | |
| set -euo pipefail | |
| version="${GITHUB_REF_NAME}" | |
| archive="notes-web-${version}-${GOOS}-${GOARCH}.tar.gz" | |
| mkdir -p dist package | |
| go build \ | |
| -trimpath \ | |
| -ldflags "-s -w" \ | |
| -o "package/notes-web" \ | |
| ./cmd/notes-web | |
| tar -C package -czf "dist/${archive}" notes-web | |
| - name: Upload archive | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: archive-${{ matrix.goos }}-${{ matrix.goarch }} | |
| path: dist/*.tar.gz | |
| if-no-files-found: error | |
| release: | |
| name: Create GitHub Release | |
| runs-on: ubuntu-latest | |
| needs: build | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Download archives | |
| uses: actions/download-artifact@v4 | |
| with: | |
| path: dist | |
| merge-multiple: true | |
| - name: Generate checksums | |
| shell: bash | |
| run: | | |
| set -euo pipefail | |
| cd dist | |
| sha256sum *.tar.gz > checksums-sha256.txt | |
| - name: Create release | |
| shell: bash | |
| env: | |
| GH_TOKEN: ${{ github.token }} | |
| TAG: ${{ github.ref_name }} | |
| run: | | |
| set -euo pipefail | |
| gh release create "${TAG}" \ | |
| --verify-tag \ | |
| --generate-notes \ | |
| dist/*.tar.gz \ | |
| dist/checksums-sha256.txt |