Skip to content

Commit

Permalink
Merge pull request #54 from openfga/ci/fix-release
Browse files Browse the repository at this point in the history
ci: fix needs for create-release and pass tag name via env
  • Loading branch information
rhamzeh authored Sep 9, 2024
2 parents 4993be2 + 242b027 commit a67c7f9
Showing 1 changed file with 22 additions and 21 deletions.
43 changes: 22 additions & 21 deletions .github/workflows/publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,26 +11,6 @@ jobs:
test:
uses: ./.github/workflows/main.yaml

create-release:
runs-on: ubuntu-latest
needs: [publish-maven-central, publish-github-packages]
permissions:
contents: write
packages: write # publish a new github release
steps:
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
with:
fetch-depth: 0

- name: Create Release
uses: Roang-zero1/github-create-release-action@57eb9bdce7a964e48788b9e78b5ac766cb684803 # v3.0.1
with:
version_regex: ^v[[:digit:]]+\.[[:digit:]]+\.[[:digit:]]+
changelog_file: CHANGELOG.md
create_draft: true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

publish:
needs: test
runs-on: ubuntu-latest
Expand Down Expand Up @@ -64,4 +44,25 @@ jobs:
- name: Upload Release Asset
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: gh release upload ${{ github.event.release.tag_name }} ./build/distributions/*
TAG_NAME: ${{ github.event.release.tag_name }}
run: gh release upload "${{ env.TAG_NAME }}" ./build/distributions/*

create-release:
runs-on: ubuntu-latest
needs: publish
permissions:
contents: write
packages: write # publish a new github release
steps:
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
with:
fetch-depth: 0

- name: Create Release
uses: Roang-zero1/github-create-release-action@57eb9bdce7a964e48788b9e78b5ac766cb684803 # v3.0.1
with:
version_regex: ^v[[:digit:]]+\.[[:digit:]]+\.[[:digit:]]+
changelog_file: CHANGELOG.md
create_draft: true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 comments on commit a67c7f9

Please sign in to comment.