diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 208b8ec..0055d93 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -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 }} @@ -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: @@ -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 }})