Skip to content

Commit

Permalink
chore: update release
Browse files Browse the repository at this point in the history
  • Loading branch information
lievenhey committed Jun 10, 2024
1 parent e92fba0 commit 0aba1c7
Showing 1 changed file with 29 additions and 3 deletions.
32 changes: 29 additions & 3 deletions .github/workflows/release-appimage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ on:
- 'master'
- '1.*'

env:
CONTINUOUS_BUILD: "${{ github.ref_name == 'master' && true || false }}"

jobs:
latest-release:
runs-on: ubuntu-latest
Expand All @@ -17,11 +20,30 @@ jobs:
fetch-depth: 0
submodules: recursive

- name: TEST
run: echo "TEST ${{ env.CONTINUOUS_BUILD }}"

- name: Bundle sources artifacts
run: |
version=$(git describe --tags | sed -En 's/(v[0-9\.]+)-.*/\1/p')
cp -r . "/tmp/hotspot-${version}"
cd /tmp
tar czf "${{ github.workspace }}/hotspot-perfparser-${version}.tar.gz" --exclude=.git "hotspot-${version}/3rdparty/perfparser"
zip -r "${{ github.workspace }}/hotspot-perfparser-${version}.zip" "hotspot-${version}/3rdparty/perfparser" -x "hotspot-${version}/3rdparty/perfparser/.git"
tar czf "${{ github.workspace }}/hotspot-PrefixTickLabels-${version}.tar.gz" --exclude=.git "hotspot-${version}/3rdparty/PrefixTickLabels"
zip -r "${{ github.workspace }}/hotspot-PrefixTickLabels-${version}.zip" "hotspot-${version}/3rdparty/PrefixTickLabels" -x "hotspot-${version}/3rdparty/PrefixTickLabels/.git"
tar czf "${{ github.workspace }}/hotspot-${version}.tar.gz" --exclude=".git,perfparser,PrefixTickLabels" "hotspot-${version}"
zip -r "${{ github.workspace }}/hotspot-${version}.zip" "hotspot-${version}" -x "hotspot-${version}/3rdparty/" -x "hotspot-${version}/.git"
rm -rf "hotspot-${version}"
- name: Build
uses: docker://ghcr.io/kdab/kdesrc-build:latest

- name: Delete latest release
if: github.ref_name == 'master'
if: ${{ env.CONTINUOUS_BUILD }}
run: |
gh release delete continuous --cleanup-tag || true
env:
Expand All @@ -34,7 +56,7 @@ jobs:
- name: Create latest release
uses: ncipollo/release-action@v1
if: github.ref_name == 'master'
if: ${{ env.CONTINUOUS_BUILD }}
with:
name: "continuous"
tag: "continuous"
Expand All @@ -43,17 +65,21 @@ jobs:
token: ${{ secrets.GITHUB_TOKEN }}
artifacts: |
${{ github.workspace }}/hotspot-debuginfo-*
${{ github.workspace }}/hotspot-perfparser-v*
${{ github.workspace }}/hotspot-PrefixTickLabels-v*
${{ github.workspace }}/hotspot-v*
${{ github.workspace }}/*.AppImage
- name: Release latest release
if: github.ref_name == 'master'
if: ${{ env.CONTINUOUS_BUILD }}
run: |
gh release edit continuous --draft=false || true
env:
GH_TOKEN: ${{ github.token }}

- name: Create release PR
uses: googleapis/[email protected]
if: ${{ ! env.CONTINUOUS_BUILD }}
with:
token: ${{ github.token }}
release-type: simple
Expand Down

0 comments on commit 0aba1c7

Please sign in to comment.