Skip to content

Commit

Permalink
update ci config
Browse files Browse the repository at this point in the history
  • Loading branch information
Tlaster committed Dec 25, 2021
1 parent 9f9720a commit 446d382
Showing 1 changed file with 10 additions and 57 deletions.
67 changes: 10 additions & 57 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -108,60 +108,13 @@ jobs:
steps:
- uses: actions/download-artifact@v2

- name: Check if is prelease
if: startsWith(github.ref, 'refs/tags/')
id: check-tag
run: |
if [[ ${{ github.event.ref }} =~ ^refs/tags/[0-9]+\.[0-9]+\.[0-9]+\-(dev|beta)[0-9]+$ ]]; then
echo ::set-output name=prelease::true
fi
- name: Create Prerelease
if: startsWith(github.ref, 'refs/tags/') && steps.check-tag.outputs.prelease == 'true'
run: |
set -x
assets=()
for asset in $(find -name *.deb); do
assets+=("-a" "$asset")
done
for asset in $(find -name *.msi); do
assets+=("-a" "$asset")
done
for asset in $(find -name *.dmg); do
assets+=("-a" "$asset")
done
for asset in $(find -name *.apk); do
assets+=("-a" "$asset")
done
for asset in $(find -name *.aab); do
assets+=("-a" "$asset")
done
tag_name="${GITHUB_REF##*/}"
hub release create "${assets[@]}" -m "$tag_name" "$tag_name" -p
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Create Release
if: startsWith(github.ref, 'refs/tags/') && steps.check-tag.outputs.prelease != 'true'
run: |
set -x
assets=()
for asset in $(find -name *.deb); do
assets+=("-a" "$asset")
done
for asset in $(find -name *.msi); do
assets+=("-a" "$asset")
done
for asset in $(find -name *.dmg); do
assets+=("-a" "$asset")
done
for asset in $(find -name *.apk); do
assets+=("-a" "$asset")
done
for asset in $(find -name *.aab); do
assets+=("-a" "$asset")
done
tag_name="${GITHUB_REF##*/}"
hub release create "${assets[@]}" -m "$tag_name" "$tag_name"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Draft a new release
uses: softprops/action-gh-release@v1
with:
draft: true
files: |
**/*.deb
**/*.msi
**/*.dmg
**/*.apk
**/*.aab

0 comments on commit 446d382

Please sign in to comment.