chore: update release #80
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Create latest release | ||
on: | ||
push: | ||
branches: | ||
- 'master' | ||
- '1.*' | ||
env: | ||
CONTINUOUS_BUILD: ${{ github.ref_name == 'master' && true || false }} | ||
VERSION: ${{ env.CONTINUOUS_BUILD }} == true && version="continuous" || version=$(git describe --tags | sed -En 's/(v[0-9\.]+)-.*/\1/p') | ||
Check failure on line 11 in .github/workflows/release-appimage.yml
|
||
jobs: | ||
latest-release: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
submodules: recursive | ||
- name: TEST | ||
run: echo "TEST ${{ env.CONTINUOUS_BUILD }}" | ||
- name: Bundle sources artifacts | ||
run: | | ||
cp -r . "/tmp/hotspot-${{ env.VERSION }}" | ||
cd /tmp | ||
tar czf "${{ github.workspace }}/hotspot-perfparser-${{ env.VERSION }}.tar.gz" --exclude=.git "hotspot-${{ env.VERSION }}/3rdparty/perfparser" | ||
zip -r "${{ github.workspace }}/hotspot-perfparser-${{ env.VERSION }}.zip" "hotspot-${{ env.VERSION }}/3rdparty/perfparser" -x "hotspot-${{ env.VERSION }}/3rdparty/perfparser/.git" | ||
tar czf "${{ github.workspace }}/hotspot-PrefixTickLabels-${{ env.VERSION }}.tar.gz" --exclude=.git "hotspot-${{ env.VERSION }}/3rdparty/PrefixTickLabels" | ||
zip -r "${{ github.workspace }}/hotspot-PrefixTickLabels-${{ env.VERSION }}.zip" "hotspot-${{ env.VERSION }}/3rdparty/PrefixTickLabels" -x "hotspot-${{ env.VERSION }}/3rdparty/PrefixTickLabels/.git" | ||
tar czf "${{ github.workspace }}/hotspot-${{ env.VERSION }}.tar.gz" --exclude=.git --exclude=3rdparty/perfparser --exclude=3rdparty/PrefixTickLabels "hotspot-${{ env.VERSION }}" | ||
zip -r "${{ github.workspace }}/hotspot-${{ env.VERSION }}.zip" "hotspot-${{ env.VERSION }}" -x "hotspot-${{ env.VERSION }}/3rdparty/" -x "hotspot-${{ env.VERSION }}/.git" | ||
rm -rf "hotspot-${{ env.VERSION }}" | ||
- name: Build | ||
uses: docker://ghcr.io/kdab/kdesrc-build:latest | ||
- name: Delete latest release | ||
if: env.CONTINUOUS_BUILD == 'true' | ||
run: | | ||
gh release delete continuous --cleanup-tag || true | ||
env: | ||
GH_TOKEN: ${{ github.token }} | ||
- name: Rename artifacts | ||
run: | | ||
[[ ${{ env.CONTINUOUS_BUILD }} == true ]] && version="continuous" || version=$(git describe --tags | sed -En 's/(v[0-9\.]+)-.*/\1/p') | ||
cd ${{ github.workspace }} && mv hotspot-*.AppImage "hotspot-${{ env.VERSION }}.AppImage" | ||
cd ${{ github.workspace }} && mv hotspot-debuginfo-*.tar.bz2 "hotspot-debuginfo-${{ env.VERSION }}.tar.bz2" | ||
- name: Create latest release | ||
uses: ncipollo/release-action@v1 | ||
if: env.CONTINUOUS_BUILD == 'true' | ||
with: | ||
name: "continuous" | ||
tag: "continuous" | ||
prerelease: true | ||
body: "The newest version directly from the master branch. THIS IS BLEEDING ENDGE AND WILL MOST LIKELY CONTAIN UNKOWN BUGS." | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
artifacts: | | ||
"${{ github.workspace }}/hotspot-${{ env.VERSION }}.AppImage" | ||
"${{ github.workspace }}/hotspot-${{ env.VERSION }}.tar.gz" | ||
"${{ github.workspace }}/hotspot-${{ env.VERSION }}.zip" | ||
"${{ github.workspace }}/hotspot-debuginfo-${{ env.VERSION }}.tar.bz2" | ||
"${{ github.workspace }}/hotspot-perfparser-${{ env.VERSION }}.tar.gz" | ||
"${{ github.workspace }}/hotspot-perfparser-${{ env.VERSION }}.zip" | ||
"${{ github.workspace }}/hotspot-PrefixTickLabels-${{ env.VERSION }}.tar.gz" | ||
"${{ github.workspace }}/hotspot-PrefixTickLabels-${{ env.VERSION }}.zip" | ||
- name: Release latest release | ||
if: env.CONTINUOUS_BUILD == 'true' | ||
run: | | ||
gh release edit continuous --draft=false || true | ||
env: | ||
GH_TOKEN: ${{ github.token }} | ||
- name: Create release PR | ||
id: release | ||
uses: googleapis/[email protected] | ||
if: env.CONTINUOUS_BUILD == 'false' | ||
with: | ||
token: ${{ github.token }} | ||
release-type: simple | ||
target-branch: ${{ github.ref_name }} | ||
- name: Upload Release Artifact | ||
if: ${{ steps.release.outputs.release_created }} | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
run: | | ||
gh release upload ${{ steps.release.outputs.tag_name }} "${{ github.workspace }}/hotspot-${{ env.VERSION }}.AppImage" "${{ github.workspace }}/hotspot-${{ env.VERSION }}.tar.gz" "${{ github.workspace }}/hotspot-${{ env.VERSION }}.zip" "${{ github.workspace }}/hotspot-debuginfo-${{ env.VERSION }}.tar.bz2" "${{ github.workspace }}/hotspot-perfparser-${{ env.VERSION }}.tar.gz" "${{ github.workspace }}/hotspot-perfparser-${{ env.VERSION }}.zip" "${{ github.workspace }}/hotspot-PrefixTickLabels-${{ env.VERSION }}.tar.gz" "${{ github.workspace }}/hotspot-PrefixTickLabels-${{ env.VERSION }}.zip" |