Skip to content

Commit

Permalink
ci: add release job
Browse files Browse the repository at this point in the history
  • Loading branch information
chenasraf committed Nov 4, 2024
1 parent 61d0ec5 commit 06fba6c
Showing 1 changed file with 34 additions and 0 deletions.
34 changes: 34 additions & 0 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
on:
push:
branches: [master]
tags:
- 'v*'
pull_request:
workflow_dispatch:
name: Build Packages
Expand Down Expand Up @@ -47,3 +49,35 @@ jobs:
name: Redot.snap
path: redot*.snap

release:
name: Create Release

needs: [flatpak, snap]
if: ${{ github.ref_type == 'tag' && startsWith(github.ref_name, 'v') }}
runs-on: ubuntu-latest

steps:

- name: Get Redot Release Tag
run: |
VERSION="${{ github.ref_name }}"
VERSION="${VERSION/v//}"
echo VERSION=${VERSION} >> $GITHUB_ENV
- name: Create Release
uses: softprops/action-gh-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
name: Release ${{ github.ref_name }}
body: |
Flatpak and Snapcraft builds for Redot ${{ env.VERSION }}
- [Source code](https://github.com/Redot-Engine/redot-engine/releases/tag/redot-${{ env.VERSION }}
- [Snap Store](https://snapcraft.io/redot)
<!-- [FlatHub](https://flathub.org/apps/details/org.redotengine.Redot) -->
draft: false
prerelease: ${{ startsWith(github.ref_name, 'v') && contains(github.ref, 'beta') }}
files: |
Redot-x86_64
Redot.snap

0 comments on commit 06fba6c

Please sign in to comment.