forked from arcalot/arcaflow-docsgen
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Renovate and refactor the workflow (arcalot#22)
* Update all dependencies Signed-off-by: Platform Engineering Bot <[email protected]> * Replace digests with semantic version tags * Use common reusable workflow to list and test Go sources * Rename build.yml to build.yaml * Use global variable for Go version --------- Signed-off-by: Platform Engineering Bot <[email protected]> Co-authored-by: platform-engineering-bot <[email protected]>
- Loading branch information
1 parent
1d1b7c1
commit 28bffa7
Showing
3 changed files
with
51 additions
and
109 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
name: Build | ||
on: | ||
push: | ||
branches: | ||
- main | ||
tags: | ||
- v* | ||
pull_request: | ||
env: | ||
go_version: ${{ vars.ARCALOT_GO_VERSION }} | ||
jobs: | ||
lint_and_test: | ||
name: lint and test | ||
uses: arcalot/arcaflow-reusable-workflows/.github/workflows/go_lint_and_test.yaml@main | ||
build: | ||
name: build | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: write | ||
needs: | ||
- lint_and_test | ||
env: | ||
for_release: ${{ startsWith(github.event.ref, 'refs/tags/') }} | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
- name: Set up Go | ||
uses: actions/setup-go@v5 | ||
with: | ||
go-version: ${{ env.go_version }} | ||
- name: Build ${{ env.for_release == 'true' && 'release' || 'snapshot' }} | ||
uses: goreleaser/goreleaser-action@v5 | ||
with: | ||
distribution: goreleaser | ||
version: latest | ||
args: ${{ env.ARGS }} | ||
env: | ||
GITHUB_TOKEN: ${{ env.for_release == 'true' && secrets.GITHUB_TOKEN || '' }} | ||
GOPROXY: direct | ||
GOSUMDB: off | ||
ARGS: ${{ env.for_release == 'true' && 'release --clean' || 'build --snapshot' }} | ||
- name: Upload artifacts | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: binaries | ||
path: dist |
This file was deleted.
Oops, something went wrong.
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