-
Notifications
You must be signed in to change notification settings - Fork 130
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add SHA256 checksums to release artifacts (#1226)
* [actions] use go-release-action for releases and add sha256 checksums * [actions] yamllint fixes and consistency updates
- Loading branch information
1 parent
4f0ae71
commit d38a43b
Showing
20 changed files
with
148 additions
and
112 deletions.
There are no files selected for viewing
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,41 +1,42 @@ | ||
--- | ||
name: Backend release | ||
on: | ||
|
||
"on": | ||
release: | ||
types: [released] | ||
types: | ||
- 'released' | ||
|
||
jobs: | ||
binary: | ||
strategy: | ||
matrix: | ||
arch: [arm, arm64, amd64, 386] | ||
arch: [arm, arm64, amd64, "386"] | ||
os: [linux, darwin, freebsd, windows] | ||
exclude: | ||
- os: darwin | ||
arch: arm | ||
- os: darwin | ||
arch: 386 | ||
arch: "386" | ||
|
||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Download Go | ||
uses: actions/setup-go@v5 | ||
with: | ||
go-version: 1.21.1 | ||
id: go | ||
|
||
steps: | ||
- name: Check out repository | ||
uses: actions/checkout@v4 | ||
- name: Build | ||
run: | | ||
echo "Tag that is going to be used as digger version: ${{ github.event.release.tag_name }}" | ||
env GOOS=${{matrix.os}} GOARCH=${{matrix.arch}} CGO_ENABLED=0 go build -ldflags="-X digger/pkg/utils.version=${{ github.event.release.tag_name }}" -o digger-api ./backend | ||
- name: Publish linux-x64 exec to github | ||
id: upload-release-asset-linux-x64 | ||
uses: actions/upload-release-asset@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
upload_url: ${{ github.event.release.upload_url }} | ||
asset_path: 'digger-api' | ||
asset_name: digger-api-${{matrix.os}}-${{matrix.arch}} | ||
asset_content_type: application/octet-stream | ||
|
||
- name: Build and publish binary artifact to GitHub | ||
id: build-and-release-binary | ||
uses: wangyoucao577/go-release-action@8fa1e8368c8465264d64e0198208e10f71474c87 # v1.50 | ||
with: | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
goos: ${{ matrix.os }} | ||
goarch: ${{ matrix.arch }} | ||
goversion: 1.21.1 | ||
project_path: ./backend | ||
binary_name: digger-api | ||
pre_command: export CGO_ENABLED=0 | ||
ldflags: ${{ matrix.ldflags }} | ||
sha256sum: true | ||
md5sum: false | ||
asset_name: "digger-api-${{matrix.os}}-${{matrix.arch}}" | ||
compress_assets: "OFF" |
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,44 +1,44 @@ | ||
--- | ||
name: release cli multi architecture | ||
on: | ||
|
||
"on": | ||
release: | ||
branches: | ||
- 'go' | ||
types: [released] | ||
types: | ||
- 'released' | ||
|
||
jobs: | ||
binary: | ||
strategy: | ||
matrix: | ||
arch: [arm, arm64, amd64, 386] | ||
arch: [arm, arm64, amd64, "386"] | ||
os: [linux, darwin, freebsd, windows] | ||
exclude: | ||
- os: darwin | ||
arch: arm | ||
- os: darwin | ||
arch: 386 | ||
arch: "386" | ||
|
||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Download Go | ||
uses: actions/setup-go@v5 | ||
with: | ||
go-version: 1.21.1 | ||
id: go | ||
|
||
- name: Check out repository | ||
uses: actions/checkout@v4 | ||
- name: Build | ||
run: | | ||
echo "Tag that is going to be used as digger version: ${{ github.event.release.tag_name }}" | ||
env GOOS=${{matrix.os}} GOARCH=${{matrix.arch}} CGO_ENABLED=0 go build -ldflags="-X digger/pkg/utils.version=${{ github.event.release.tag_name }}" -o digger ./cli/cmd/digger | ||
|
||
- name: Publish linux-x64 exec to github | ||
id: upload-release-asset-linux-x64 | ||
uses: actions/upload-release-asset@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
- name: Build and publish binary artifact to GitHub | ||
id: build-and-release-binary | ||
uses: wangyoucao577/go-release-action@8fa1e8368c8465264d64e0198208e10f71474c87 # v1.50 | ||
with: | ||
upload_url: ${{ github.event.release.upload_url }} | ||
asset_path: 'digger' | ||
asset_name: digger-cli-${{matrix.os}}-${{matrix.arch}} | ||
asset_content_type: application/octet-stream | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
goos: ${{ matrix.os }} | ||
goarch: ${{ matrix.arch }} | ||
goversion: 1.21.1 | ||
project_path: ./cli/cmd/digger | ||
binary_name: digger | ||
pre_command: export CGO_ENABLED=0 | ||
ldflags: ${{ matrix.ldflags }} | ||
sha256sum: true | ||
md5sum: false | ||
asset_name: "digger-cli-${{matrix.os}}-${{matrix.arch}}" | ||
compress_assets: "OFF" |
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
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
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
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
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
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
Oops, something went wrong.