From 13876f1786de060a07286dc96993b836a499d8f8 Mon Sep 17 00:00:00 2001 From: francovaro Date: Fri, 2 Feb 2024 09:36:19 +0100 Subject: [PATCH] Splitted create release and crate pack --- .github/workflows/pack.yml | 33 ++++----------------------------- .github/workflows/release.yml | 33 +++++++++++++++++++++++++++++++++ 2 files changed, 37 insertions(+), 29 deletions(-) create mode 100644 .github/workflows/release.yml diff --git a/.github/workflows/pack.yml b/.github/workflows/pack.yml index 71f65fe..4f05f08 100644 --- a/.github/workflows/pack.yml +++ b/.github/workflows/pack.yml @@ -1,17 +1,14 @@ -name: Build pack +name: Create pack on: - workflow_dispatch: - pull_request: - push: - tags: - - '*' + release: + types: [created] concurrency: group: ${{ github.workflow }}-${{ github.ref }} cancel-in-progress: true jobs: - pack: + release: name: Generate pack runs-on: ubuntu-22.04 steps: @@ -29,25 +26,3 @@ jobs: packchk-version: 1.3.98 gen-pack-script: ./gen_pack.sh gen-pack-output: ./output - - - name: Create Release - id: create_release - uses: actions/create-release@v1.0.0 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - with: - tag_name: ${{ github.ref }} - release_name: Release ${{ github.ref }} - draft: false - prerelease: false - - - name: Upload release asset - id: upload-release-asset - uses: actions/upload-release-asset@v1.0.1 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - with: - upload_url: ${{ steps.create_release.outputs.upload_url }} - asset_path: ./output/*.pack - asset_name: ${{ github.ref }}.pack - asset_content_type: application/zip \ No newline at end of file diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..9aa7978 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,33 @@ +name: Create release +on: + push: + tags: + - '*' + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + +jobs: + release: + name: Create Release + runs-on: ubuntu-22.04 + steps: + - uses: actions/checkout@v3 + with: + fetch-depth: 0 + + - name: Fetch tags + run: | + git fetch --tags --force + + - name: Create Release + id: create_release + uses: actions/create-release@v1.0.0 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + tag_name: ${{ github.ref }} + release_name: Release ${{ github.ref }} + draft: false + prerelease: false