Skip to content

Commit

Permalink
WIP: Create release
Browse files Browse the repository at this point in the history
  • Loading branch information
apyrgio committed Nov 1, 2024
1 parent a8dd1b2 commit 0cd9f51
Showing 1 changed file with 22 additions and 22 deletions.
44 changes: 22 additions & 22 deletions .github/workflows/CI.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -124,37 +124,37 @@ jobs:
create_release:
name: Create a release
runs-on: ubuntu-latest
needs: ["basic_checks", "test", "build", "lint_proto"]
#needs: ["basic_checks", "test", "build", "lint_proto"]
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v')
steps:
- name: Set release tag
run: echo GITHUB_RELEASE_TAG=${GITHUB_REF#refs/tags/} >> $GITHUB_ENV

- name: Create release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: Release ${{ env.GITHUB_RELEASE_TAG }}
draft: true
prerelease: false
body: |
This release contains the latest assets for tag `${{ env.GITHUB_RELEASE_TAG }}`.
- name: Create release notes
run: |
cat > release_notes <<EOF
This release contains the latest assets for tag `${{ env.GITHUB_RELEASE_TAG }}`.
## Changes
## Changes
The changes for this release can be found in the [changelog].
The changes for this release can be found in the [changelog].
[changelog]: https://github.com/${{ github.repository }}/blob/${{ env.GITHUB_RELEASE_TAG }}/CHANGELOG.md
[changelog]: https://github.com/${{ github.repository }}/blob/${{ env.GITHUB_RELEASE_TAG }}/CHANGELOG.md
EOF
- name: Store release context
- name: Create release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
cat <<EOF > release_context
::set-output name=ref::${{ env.GITHUB_RELEASE_TAG }}
::set-output name=upload_url::${{ steps.create_release.outputs.upload_url }}
EOF
gh release create ${{ env.GITHUB_RELEASE_TAG }} \
--draft --notes-file release_notes
#- name: Store release context
# run: |
# cat <<EOF > release_context
# ::set-output name=ref::${{ env.GITHUB_RELEASE_TAG }}
# ::set-output name=upload_url::${{ steps.create_release.outputs.upload_url }}
# EOF

- name: Upload release context
uses: actions/upload-artifact@v4
Expand All @@ -163,7 +163,7 @@ jobs:
path: release_context

upload_assets:
name: Upload release assets (${{ matrix.arch }})
name: Upload release assets ( ${{ matrix.arch }} )
needs: create_release
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v')
runs-on: ubuntu-latest
Expand Down

0 comments on commit 0cd9f51

Please sign in to comment.