fix(security): resolve open code-scanning alerts (XSS, int-conversion… #231
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: read | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| goos: [linux, darwin] | |
| goarch: [amd64, arm64] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-go@v5 | |
| with: | |
| # Minimum supported build toolchain is Go 1.25.12 (go.mod floor); | |
| # "1.25" resolves to the latest 1.25.x patch release. | |
| go-version: "1.25" | |
| - name: build | |
| env: | |
| GOOS: ${{ matrix.goos }} | |
| GOARCH: ${{ matrix.goarch }} | |
| CGO_ENABLED: "0" | |
| run: | | |
| TAG=${GITHUB_REF#refs/tags/} | |
| go build -ldflags "-s -w -X main.version=${TAG}" -o odek-${{ matrix.goos }}-${{ matrix.goarch }} ./cmd/odek | |
| - name: upload artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: odek-${{ matrix.goos }}-${{ matrix.goarch }} | |
| path: odek-${{ matrix.goos }}-${{ matrix.goarch }} | |
| release: | |
| needs: build | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write | |
| steps: | |
| - uses: actions/download-artifact@v4 | |
| with: | |
| pattern: odek-* | |
| merge-multiple: true | |
| - name: checksums | |
| run: sha256sum odek-* > checksums.txt | |
| - name: release | |
| uses: softprops/action-gh-release@v3 | |
| with: | |
| files: | | |
| odek-linux-amd64 | |
| odek-linux-arm64 | |
| odek-darwin-amd64 | |
| odek-darwin-arm64 | |
| checksums.txt | |
| generate_release_notes: true |