From d3de5f559e7220fa1734a22da1625dc4e0062bdb Mon Sep 17 00:00:00 2001 From: Hugo Milair Date: Fri, 27 Sep 2024 14:09:46 +0200 Subject: [PATCH] workflow:: use gh to upload assets --- .github/workflows/build-ui.yml | 28 +++++++++++++++------------- 1 file changed, 15 insertions(+), 13 deletions(-) diff --git a/.github/workflows/build-ui.yml b/.github/workflows/build-ui.yml index dc5f26f..36f48e2 100644 --- a/.github/workflows/build-ui.yml +++ b/.github/workflows/build-ui.yml @@ -3,6 +3,8 @@ name: Build Horizon Documentation UI bundle on: release: types: [published] +permissions: + contents: write jobs: setup: @@ -47,31 +49,31 @@ jobs: path: .cache/npm key: npm + - name: Install Dependencies + run: | + sudo apt install zip -y + sudo apt install gh -y + - name: bundle-stable run: | npm install --quiet --no-progress --cache=.cache/npm node_modules/.bin/gulp bundle - name: bundle-stable - Artifact - uses: actions/upload-release-asset@v1 - with: - upload_url: ${{ env.GITHUB_RELEASE_URL }} - asset_name: ui-bundle - asset_path: build/ui-bundle.zip - asset_content_type: application/zip + run: | + gh release upload ${{github.event.release.tag_name}} build/ui-bundle.zip + env: + GITHUB_TOKEN: ${{ github.TOKEN }} - name: pages run: | npm install --quiet --no-progress --cache=.cache/npm node_modules/.bin/gulp preview:build rm -rf public/_/{helpers,layouts,partials} - sudo apt install zip -y zip -r public.zip public - name: pages - Artifact - uses: actions/upload-release-asset@v1 - with: - upload_url: ${{ env.GITHUB_RELEASE_URL }} - asset_name: public - asset_path: public.zip - asset_content_type: application/zip + run: | + gh release upload ${{github.event.release.tag_name}} public.zip + env: + GITHUB_TOKEN: ${{ github.TOKEN }}