Merge pull request #9 from nmlynch94/update-c3ca98e #29
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
on: | |
push: | |
# Sequence of patterns matched against refs/tags | |
branches: main | |
name: Create Release | |
permissions: | |
contents: write | |
jobs: | |
build: | |
name: Create Release | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
with: | |
submodules: true | |
- name: Get tags | |
run: git fetch --tags origin | |
- name: Install dependencies | |
run: | | |
sudo apt-get update -y | |
sudo apt-get install -y \ | |
flatpak \ | |
flatpak-builder | |
- name: Build the flatpak bundle | |
run: | | |
chmod +x build.sh | |
./build.sh | |
flatpak build-bundle ~/.local/share/flatpak/repo jagex-launcher.flatpak com.jagex.Launcher | |
- name: Tag this branch with incremented release version | |
id: new-tag | |
run: | | |
LAST_TAG=$(git describe --tags $(git rev-list --tags --max-count=1)) | |
MAJOR=$(echo "$LAST_TAG" | cut -d. -f1) | |
MINOR=$(echo "$LAST_TAG" | cut -d. -f2) | |
PATCH=$(echo "$LAST_TAG" | cut -d. -f3) | |
NEW_VERSION="$MAJOR.$MINOR.$((PATCH+1))" | |
git tag "$NEW_VERSION" | |
git push "https://$GITHUB_ACTOR:${{ secrets.ACCESS_TOKEN }}@github.com/$GITHUB_REPOSITORY.git" --tags | |
echo "NEW_TAG=$NEW_VERSION" >> $GITHUB_OUTPUT | |
- name: Release | |
uses: softprops/action-gh-release@v1 | |
with: | |
files: jagex-launcher.flatpak | |
tag_name: ${{ steps.new-tag.outputs.NEW_TAG }} |