Skip to content

Commit

Permalink
Merge pull request #1 from thetestgame/testgame/ci-releases
Browse files Browse the repository at this point in the history
Added automatic releases to Github Actions
  • Loading branch information
thetestgame authored Feb 18, 2022
2 parents 92b1505 + 75a5341 commit b974812
Showing 1 changed file with 26 additions and 2 deletions.
28 changes: 26 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
name: Programmers Quest Primary CI
on:
workflow_dispatch:
push:
branches: [develop, staging, release]
pull_request:

env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}
Expand Down Expand Up @@ -35,7 +36,7 @@ jobs:
# Builds the client application
build-client-executables:
name: Build Client Executables
if: github.event_name == 'push'
if: github.event_name == 'push' || startsWith(github.ref, 'refs/tags/') || github.event_name == 'workflow_dispatch'
runs-on: ubuntu-latest
needs: perform-source-tests
permissions:
Expand All @@ -59,6 +60,29 @@ jobs:
run: |
python setup.py bdist_apps
# Creates a new client release on Github
create-client-release:
name: Create Release Version
needs: build-client-executables
if: startsWith(github.ref, 'refs/tags/')
runs-on: ubuntu-latest
steps:
- name: Build Changelog
id: github_release
uses: mikepenz/release-changelog-builder-action@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Create Release
uses: actions/create-release@v1
with:
tag_name: ${{ github.ref }}
release_name: ${{ github.ref }}
body: ${{steps.github_release.outputs.changelog}}
artifacts: "dist/*.zip"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

# Builds the Docker server images for Github Packages
build-and-push-server-packages:
name: Build Server Image (${{ matrix.name }})
Expand Down

0 comments on commit b974812

Please sign in to comment.