Skip to content

Commit

Permalink
ci: rename build steps and configure build binaries step to trigger o…
Browse files Browse the repository at this point in the history
…n release and add release artifacts
  • Loading branch information
nosduco committed Dec 27, 2023
1 parent fe6178f commit c03b480
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ jobs:
package-name: nforwardauth
pull-request-header: Prepared Release
changelog-types: '[{"type":"feat","section":"Features"},{"type":"fix","section":"Bug Fixes"},{"type":"doc","section":"Documentation"},{"type":"perf","section":"Performance"},{"type":"refactor","section":"Refactor"},{"type":"test","section":"Testing"},{"type":"chore","section":"Miscellaneous Tasks"},{"type":"ci","section":"CI/CD"}]'
build-and-publish:
name: Build and Publish
build-docker:
name: Build Docker
runs-on: ubuntu-22.04
needs: [prepare]
if: ${{ needs.prepare.outputs.release }}
Expand All @@ -46,11 +46,11 @@ jobs:
push: true
pull: true
tags: nosduco/nforwardauth:latest,nosduco/nforwardauth:v1,nosduco/nforwardauth:${{ needs.prepare.outputs.version }}
build:
name: Build
build-binaries:
name: Build Binaries
runs-on: ubuntu-22.04
needs: [prepare]
# if: ${{ needs.prepare.outputs.release }}
if: ${{ needs.prepare.outputs.release }}
strategy:
fail-fast: true
matrix:
Expand Down Expand Up @@ -128,9 +128,9 @@ jobs:
fi
mv ./target/$TARGET/release/$EXEC ./$EXEC
tar -czf ./artifacts/$NAME-$TARGET-$TAG.tar.gz $EXEC
- name: Archive artifact
uses: actions/upload-artifact@v2
with:
name: builds
path: |
./artifacts
- name: Upload artifact to release
if: ${{ needs.prepare.outputs.version }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
gh release upload ${{ needs.prepare.outputs.version }} ./artifacts/$NAME-$TARGET-$TAG.tar.gz

0 comments on commit c03b480

Please sign in to comment.