Skip to content

Commit

Permalink
Feat: auto release (#24)
Browse files Browse the repository at this point in the history
* release-artifacts.yml

* fix: permission denied error

* retry

* remove install gh cli

* fix: typo

* retry

* retry

* retry

* better way of releasing the artifact

* correctly get the tag

* combined workflow

* added github token

* check release exists

* skip publishing

* fix: if check for tagname

* fix: if check for tagname

* sleep until release is made

* retry
  • Loading branch information
sargeantPig authored Oct 23, 2023
1 parent 4d7587b commit f782478
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions .github/workflows/release-creation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,21 +22,23 @@ jobs:
uses: actions/checkout@v2

- name: Release Please
id: release-please
uses: google-github-actions/release-please-action@v3
with:
release-type: simple

- name: Wait for 2 minutes
run: |
sleep 120 # Sleep for 2 minutes (2 minutes * 60 seconds/minute)
shell: bash

- name: Check Release Creation
run: |
if [[ -z "${{ steps.release.outputs.tag_name }}" ]]; then
if [[ -z "${{ steps.release-please.outputs.tag }}" ]]; then
exit 1
fi
if gh release view "${{ steps.release.outputs.tag_name }}" > /dev/null; then
if gh release view "${{ steps.release-please.outputs.tag }}" > /dev/null; then
echo "Release was created."
else
echo "Release not created. Exiting."
Expand Down Expand Up @@ -74,7 +76,7 @@ jobs:

- name: Upload Release Artifacts
run: |
release_tag="${{ steps.release.outputs.tag_name }}"
release_tag="${{ steps.release-please.outputs.tag }}"
gh release upload "$release_tag" ${{github.workspace}}/publish/win-x64/* --clobber
gh release upload "$release_tag" ${{github.workspace}}/publish/osx-x64/* --clobber
gh release upload "$release_tag" ${{github.workspace}}/publish/linux-x64/* --clobber
Expand Down

0 comments on commit f782478

Please sign in to comment.