Skip to content

Commit

Permalink
refactor ci
Browse files Browse the repository at this point in the history
  • Loading branch information
fabien-marty authored Nov 2, 2024
1 parent ed7e553 commit 700f541
Showing 1 changed file with 13 additions and 18 deletions.
31 changes: 13 additions & 18 deletions .github/workflows/create-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:
packages: write
pull-requests: read
outputs:
tag: ${{ steps.release.outputs.tag }}
tag: ${{ steps.output.outputs.tag }}
steps:
- uses: actions/checkout@v4
with:
Expand All @@ -38,25 +38,20 @@ jobs:
- uses: actions/setup-go@v4
with:
go-version: "1.21"
- name: Run build
run: |
make build
- name: Create release
id: release
run: |
OPTIONS=""
if test "${{ github.event.inputs.draft }}" == "yes"; then
OPTIONS="${OPTIONS} --release-draft"
fi
if test "${{ github.event.inputs.force }}" == "yes"; then
OPTIONS="${OPTIONS} --release-force"
fi
echo "OPTIONS=${OPTIONS}"
TAG=`./cmd/github-create-next-semantic-release/github-create-next-semantic-release --log-level=DEBUG ${OPTIONS} .`
echo "TAG=${TAG}"
echo "tag=${TAG}" >>"$GITHUB_OUTPUT"
- id: create-release
uses: fabien-marty/github-create-next-semantic-release-action@main
with:
github-token: ${{ github.token }} # Let's use the default value of the current workflow
repository: ${{ github.repository }} # Let's use the default value of the current workflow
repository-owner: ${{ github.repository_owner }} # Let's use the default value of the current workflow
release-force: ${{ github.event.inputs.force == 'yes' }}
release-draft: ${{ github.event.inputs.draft == 'yes' }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Set output
id: output
run: |
echo "tag=${{ steps.create-release.outputs.new-tag}}" >>"$GITHUB_OUTPUT"
release_go_binary:
needs: release
name: Release Go Binary
Expand Down

0 comments on commit 700f541

Please sign in to comment.