Skip to content

Commit 0edbd52

Browse files
authored
Fix Release Pipeline (#27)
* trying to fix release workflow * adding fetch for remote tags * trying to simplify tagging * cleaning up release workflow
1 parent 19d70e6 commit 0edbd52

File tree

1 file changed

+5
-34
lines changed

1 file changed

+5
-34
lines changed

.github/workflows/release.yml

Lines changed: 5 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -21,22 +21,9 @@ jobs:
2121
VERSION=$(cat VERSION)
2222
echo "VERSION=$VERSION" >> $GITHUB_OUTPUT
2323
24-
- name: Check if tag exists
25-
id: check_tag
26-
continue-on-error: true
27-
run: git rev-parse v${{ steps.version.outputs.VERSION }} >/dev/null 2>&1
28-
29-
- name: Create release tag
30-
if: steps.check_tag.outcome == 'failure'
31-
run: |
32-
git config user.name "github-actions"
33-
git config user.email "github-actions@github.com"
34-
git tag -a v${{ steps.version.outputs.VERSION }} -m "Release ${{ steps.version.outputs.VERSION }}"
35-
git push origin v${{ steps.version.outputs.VERSION }}
36-
3724
- name: Create tar archive
3825
run: |
39-
tar -czf mio-${{ steps.version.outputs.VERSION }}.tar.gz \
26+
tar -czf /tmp/mio-${{ steps.version.outputs.VERSION }}.tar.gz \
4027
--exclude=.git \
4128
--exclude=.github \
4229
--exclude=build \
@@ -45,27 +32,11 @@ jobs:
4532
--exclude=.clang-tidy \
4633
.
4734
48-
- name: Create GitHub Release
49-
if: steps.check_tag.outcome == 'failure'
50-
id: create_release
51-
uses: actions/create-release@v1
52-
env:
53-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
54-
with:
55-
tag_name: v${{ steps.version.outputs.VERSION }}
56-
release_name: Release ${{ steps.version.outputs.VERSION }}
57-
body: |
58-
Release of MIO ${{ steps.version.outputs.VERSION }}
59-
draft: false
60-
prerelease: false
61-
6235
- name: Upload tar archive to release
63-
if: steps.check_tag.outcome == 'failure'
64-
uses: actions/upload-release-asset@v1
36+
uses: softprops/action-gh-release@v1
6537
env:
6638
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
6739
with:
68-
upload_url: ${{ steps.create_release.outputs.upload_url }}
69-
asset_path: ./mio-${{ steps.version.outputs.VERSION }}.tar.gz
70-
asset_name: mio-${{ steps.version.outputs.VERSION }}.tar.gz
71-
asset_content_type: application/gzip
40+
tag_name: v${{ steps.version.outputs.VERSION }}
41+
name: ${{ steps.version.outputs.VERSION }}
42+
files: /tmp/mio-${{ steps.version.outputs.VERSION }}.tar.gz

0 commit comments

Comments
 (0)