From 509dfd23f5afcc9ce990fde028896a7ab0700ab0 Mon Sep 17 00:00:00 2001 From: francovaro Date: Fri, 2 Feb 2024 11:06:53 +0100 Subject: [PATCH] back to single workflow --- .github/workflows/pack.yml | 42 ++++++++++++++++++++++++++++++----- .github/workflows/release.yml | 33 --------------------------- 2 files changed, 37 insertions(+), 38 deletions(-) delete mode 100644 .github/workflows/release.yml diff --git a/.github/workflows/pack.yml b/.github/workflows/pack.yml index 4f05f08..9074104 100644 --- a/.github/workflows/pack.yml +++ b/.github/workflows/pack.yml @@ -1,14 +1,17 @@ -name: Create pack +name: Build pack on: - release: - types: [created] + workflow_dispatch: + pull_request: + push: + tags: + - '*' concurrency: group: ${{ github.workflow }}-${{ github.ref }} cancel-in-progress: true jobs: - release: + pack: name: Generate pack runs-on: ubuntu-22.04 steps: @@ -20,9 +23,38 @@ jobs: run: | git fetch --tags --force - - uses: Open-CMSIS-Pack/gen-pack-action@main + - 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: Build pack + id: build_cmsis_pack + uses: Open-CMSIS-Pack/gen-pack-action@main with: doxygen-version: 1.9.6 packchk-version: 1.3.98 gen-pack-script: ./gen_pack.sh gen-pack-output: ./output + + - uses: actions/download-artifact@v4 + id: download-artifact + with: + name: artifact.zip + + - 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: ${{steps.download-artifact.outputs.download-path}} + asset_name: artifact.zip + asset_content_type: application/zip diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml deleted file mode 100644 index 9aa7978..0000000 --- a/.github/workflows/release.yml +++ /dev/null @@ -1,33 +0,0 @@ -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