From 5384feb380b8b25d2f795436b6e7d72366477e5a Mon Sep 17 00:00:00 2001 From: Khaleel Al-Adhami Date: Thu, 17 Jul 2025 16:04:01 -0700 Subject: [PATCH 1/3] replace deprecated upload github action --- .github/workflows/create-artifacts.yml | 33 ++++++-------------------- 1 file changed, 7 insertions(+), 26 deletions(-) diff --git a/.github/workflows/create-artifacts.yml b/.github/workflows/create-artifacts.yml index 5b66936..0ca624f 100644 --- a/.github/workflows/create-artifacts.yml +++ b/.github/workflows/create-artifacts.yml @@ -32,31 +32,17 @@ jobs: upload-artifacts: needs: zip-and-publish runs-on: ubuntu-latest - strategy: - matrix: - file: ${{ fromJson(needs.zip-and-publish.outputs.files) }} + permissions: + contents: write steps: - name: Download zip files uses: actions/download-artifact@v4 with: name: zip-files - - name: Debug output (file existence check) - run: | - if [ -e "${{ matrix.file }}" ]; then - echo "File '${{ matrix.file }}' exists." - else - echo "File '${{ matrix.file }}' does not exist." - fi - shell: bash - - name: Upload artifact - uses: actions/upload-release-asset@v1 - env: - GITHUB_TOKEN: ${{ secrets.RELEASE_TOKEN }} + - name: Upload release assets + uses: softprops/action-gh-release@v2 with: - upload_url: ${{ github.event.release.upload_url }} - asset_path: ./${{ matrix.file }} - asset_name: ${{ matrix.file }} - asset_content_type: application/zip + files: "*.zip" upload-templates-json: needs: upload-artifacts @@ -65,11 +51,6 @@ jobs: - name: Checkout repository uses: actions/checkout@v2 - name: Upload templates.json as release asset - uses: actions/upload-release-asset@v1 - env: - GITHUB_TOKEN: ${{ secrets.RELEASE_TOKEN }} + uses: softprops/action-gh-release@v2 with: - upload_url: ${{ github.event.release.upload_url }} - asset_path: ./templates.json - asset_name: templates.json - asset_content_type: application/json \ No newline at end of file + files: templates.json From d18fef6af2d7b40cd00733def1e13dda152033ca Mon Sep 17 00:00:00 2001 From: Khaleel Al-Adhami Date: Thu, 17 Jul 2025 16:10:55 -0700 Subject: [PATCH 2/3] specify version in worflow dispatch --- .github/workflows/create-artifacts.yml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/.github/workflows/create-artifacts.yml b/.github/workflows/create-artifacts.yml index 0ca624f..72c78e0 100644 --- a/.github/workflows/create-artifacts.yml +++ b/.github/workflows/create-artifacts.yml @@ -2,6 +2,12 @@ name: Zip and Publish Subfolders on: release: types: [published] + workflow_dispatch: + inputs: + version: + description: 'Version tag for the artifacts' + required: true + type: string jobs: zip-and-publish: runs-on: ubuntu-latest @@ -43,6 +49,7 @@ jobs: uses: softprops/action-gh-release@v2 with: files: "*.zip" + tag_name: ${{ github.event.inputs.version || github.ref_name }} upload-templates-json: needs: upload-artifacts @@ -54,3 +61,4 @@ jobs: uses: softprops/action-gh-release@v2 with: files: templates.json + tag_name: ${{ github.event.inputs.version || github.ref_name }} From bda83c04385cb4570d00e096c39b774e05faa27a Mon Sep 17 00:00:00 2001 From: Khaleel Al-Adhami Date: Thu, 17 Jul 2025 16:14:43 -0700 Subject: [PATCH 3/3] permissions write --- .github/workflows/create-artifacts.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/create-artifacts.yml b/.github/workflows/create-artifacts.yml index 72c78e0..43ac5fd 100644 --- a/.github/workflows/create-artifacts.yml +++ b/.github/workflows/create-artifacts.yml @@ -54,6 +54,8 @@ jobs: upload-templates-json: needs: upload-artifacts runs-on: ubuntu-latest + permissions: + contents: write steps: - name: Checkout repository uses: actions/checkout@v2