update changelog and version for v3.70.0 #10
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: | |
| strategy: | |
| matrix: | |
| include: | |
| - { goos: linux, goarch: amd64 } | |
| - { goos: linux, goarch: arm64 } | |
| - { goos: linux, goarch: arm, goarm: '6' } | |
| - { goos: linux, goarch: '386' } | |
| - { goos: linux, goarch: riscv64 } | |
| - { goos: darwin, goarch: amd64 } | |
| - { goos: darwin, goarch: arm64 } | |
| - { goos: windows, goarch: amd64 } | |
| - { goos: windows, goarch: arm64 } | |
| - { goos: windows, goarch: '386' } | |
| - { goos: freebsd, goarch: amd64 } | |
| - { goos: freebsd, goarch: arm64 } | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | |
| - uses: actions/setup-go@4b73464bb391d4059bd26b0524d20df3927bd417 # v6.3.0 | |
| with: | |
| go-version: 1.26.x | |
| - name: Build | |
| env: | |
| CGO_ENABLED: '0' | |
| GOOS: ${{ matrix.goos }} | |
| GOARCH: ${{ matrix.goarch }} | |
| GOARM: ${{ matrix.goarm }} | |
| run: | | |
| ext="" | |
| if [ "$GOOS" = "windows" ]; then ext=".exe"; fi | |
| go build -trimpath -ldflags="-s -w" -o "task${ext}" ./cmd/task | |
| - name: Package | |
| run: | | |
| ext="" | |
| if [ "${{ matrix.goos }}" = "windows" ]; then ext=".exe"; fi | |
| name="task_${{ matrix.goos }}_${{ matrix.goarch }}" | |
| mkdir "$name" | |
| cp "task${ext}" README.md LICENSE "$name/" | |
| cp -r completion "$name/" | |
| if [ "${{ matrix.goos }}" = "windows" ]; then | |
| zip -r "${name}.zip" "$name" | |
| else | |
| tar czf "${name}.tar.gz" "$name" | |
| fi | |
| - uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7.0.0 | |
| with: | |
| name: task_${{ matrix.goos }}_${{ matrix.goarch }} | |
| path: task_${{ matrix.goos }}_${{ matrix.goarch }}.* | |
| release: | |
| needs: build | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3.0 | |
| with: | |
| path: artifacts | |
| merge-multiple: true | |
| - name: Generate checksums | |
| run: | | |
| cd artifacts | |
| sha256sum task_* > task_checksums.txt | |
| - name: Create release | |
| env: | |
| GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| GH_REPO: ${{ github.repository }} | |
| run: | | |
| tag="${GITHUB_REF#refs/tags/}" | |
| gh release create "$tag" artifacts/* \ | |
| --title "$tag" \ | |
| --generate-notes |