Skip to content

Commit

Permalink
Merge pull request #51 from Samueru-sama/main
Browse files Browse the repository at this point in the history
Make versioned releases
  • Loading branch information
ivan-hc authored Jan 11, 2025
2 parents 5c35f33 + 371ee11 commit f6c63e4
Show file tree
Hide file tree
Showing 2 changed files with 60 additions and 10 deletions.
65 changes: 57 additions & 8 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,24 @@ jobs:
./"$APP"-conty-builder.sh
mkdir dist
mv *AppImage* dist/
- name: Check version file
run: |
cat ~/version
echo "APP_VERSION=$(cat ~/version)" >> "${GITHUB_ENV}"
- name: Upload artifact
uses: actions/[email protected].0
uses: actions/[email protected].3
with:
name: Steam-x86_64.AppImage
name: AppImage
path: 'dist'

- name: Upload version file
uses: actions/[email protected]
with:
name: version
path: ~/version

release:
needs: [build]
permissions: write-all
Expand All @@ -40,15 +52,52 @@ jobs:
steps:
- uses: actions/[email protected]
with:
name: Steam-x86_64.AppImage
name: AppImage
- uses: actions/[email protected]
with:
name: version

- name: Read version
run: |
cat version
export VERSION="$(<version)"
echo "APP_VERSION=${VERSION}" >> "${GITHUB_ENV}"
#Version Release
- name: Del Previous Release
run: |
gh release delete "${APP_VERSION}" --repo "${GITHUB_REPOSITORY}" --cleanup-tag -y
env:
GH_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
continue-on-error: true
- name: Continuous Releaser
uses: softprops/action-gh-release@v2
with:
name: "Steam AppImage ${{ env.APP_VERSION}}"
tag_name: "${{ env.APP_VERSION}}"
prerelease: false
draft: false
generate_release_notes: false
make_latest: true
files: |
*.AppImage*
continue-on-error: false

- name: release
uses: marvinpinto/action-automatic-releases@latest
#Snapshot Release
- name: Get Date
run: |
SNAPSHOT_TAG="$(date --utc +'%Y%m%d-%H%M%S')"
echo SNAPSHOT_TAG="${SNAPSHOT_TAG}" >> "${GITHUB_ENV}"
continue-on-error: false
- name: Snapshot Releaser
uses: softprops/action-gh-release@v2
with:
title: Continuous build
automatic_release_tag: continuous
name: "Snapshot ${{ env.APP_VERSION}}"
tag_name: "${{ env.SNAPSHOT_TAG}}"
prerelease: false
draft: false
generate_release_notes: false
make_latest: false
files: |
*.AppImage*
repo_token: ${{ secrets.GITHUB_TOKEN }}
continue-on-error: false
5 changes: 3 additions & 2 deletions steam-conty-builder.sh
Original file line number Diff line number Diff line change
Expand Up @@ -365,10 +365,11 @@ fi
cd .. || exit 1

# EXPORT THE APPDIR TO AN APPIMAGE
export VERSION="$(curl -Ls https://archlinux.org/packages/multilib/x86_64/steam/ | grep 'steam [0-9]' | grep -Eo '\b[0-9][^ <>]*\b' | head -1)"
export ARCH=x86_64
export VERSION="$(curl -Ls https://archlinux.org/packages/multilib/x86_64/steam/ | grep 'steam [0-9]' | grep -Eo '\b[0-9][^ <>]*\b' | head -1)"
echo "$VERSION" > ~/version
./appimagetool --comp zstd --mksquashfs-opt -Xcompression-level --mksquashfs-opt 1 \
-u "gh-releases-zsync|$GITHUB_REPOSITORY_OWNER|Steam-appimage|continuous|*x86_64.AppImage.zsync" \
-u "gh-releases-zsync|$GITHUB_REPOSITORY_OWNER|Steam-appimage|latest|*x86_64.AppImage.zsync" \
./"$APP".AppDir Steam-"$VERSION"-"$ARCH".AppImage
cd .. && mv ./tmp/*.AppImage* ./ || exit 1

0 comments on commit f6c63e4

Please sign in to comment.