Skip to content

Upload Release

Upload Release #26

name: "Upload Release"
on:
workflow_dispatch:
inputs:
version:
description: "Release Version Number"
required: true
release-description:
description: "Release Description"
concurrency:
group: "${{ github.workflow }} @ ${{ github.event.pull_request.head.label || github.head_ref || github.ref }}"
cancel-in-progress: true
jobs:
upload-release:
runs-on: ubuntu-latest
steps:
- name: "Waiting for Tests to finish"
uses: lewagon/wait-on-check-action@v1.3.1
with:
ref: ${{ github.ref }}
check-name: run-tests
repo-token: ${{ secrets.GITHUB_TOKEN }}
wait-interval: 5
allowed-conclusions: success
- name: "Checkout"
uses: actions/checkout@v3
- name: "Use PHP"
uses: shivammathur/setup-php@v2
with:
php-version: "8.1"
- name: "Install Dependencies"
run: composer install --no-dev
- name: "Zip release"
run: cd ../ && zip -x ${{ github.event.repository.name }}/.github/\* -x ${{ github.event.repository.name }}/.git/\*
-x ${{ github.event.repository.name }}/tests/\* -x ${{ github.event.repository.name }}/runE2ETests.sh
-x ${{ github.event.repository.name }}/compose.yaml -x ${{ github.event.repository.name }}/.gitignore
-r ${{ github.event.repository.name }}.zip ${{ github.event.repository.name }}
- name: "Create Release"
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ inputs.version }}
release_name: Release ${{ inputs.version }}
body: ${{ inputs.release-description }}
draft: false
prerelease: false
- name: "Upload Release Asset"
id: upload-release-asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ../${{ github.event.repository.name }}.zip
asset_name: ${{ github.event.repository.name }}.zip
asset_content_type: application/zip