From 929f3b6b9328fc5ee5bbaa1fc2d4289ef83284af Mon Sep 17 00:00:00 2001 From: Hugo Saporetti Junior Date: Thu, 24 Oct 2024 20:36:21 -0300 Subject: [PATCH] Add upload assets to release to upload the fonts --- .github/workflows/publish.yml | 73 ++++++++++++++++++++--------------- 1 file changed, 42 insertions(+), 31 deletions(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 6f9d3694..35d7f3b6 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -36,6 +36,7 @@ on: - 'major' permissions: + id-token: write contents: write jobs: @@ -92,42 +93,52 @@ jobs: echo "version=$( echo "$version" )" >> $GITHUB_OUTPUT create-release: - if: inputs.create_release - needs: publish - name: Create Release - runs-on: ubuntu-latest - steps: - - name: Checkout Repository - uses: actions/checkout@v3 - - name: Git Tag Version - uses: yorevs/hspylib/.github/actions/tag-version@master - with: - tag-name: "v${{ needs.publish.outputs.version }}" - github-token: ${{ secrets.GITHUB_TOKEN }} - - name: Create Changelog - id: change-log - uses: yorevs/hspylib/.github/actions/changelog@master - with: - tag-name: "v${{ needs.publish.outputs.version }}" - - name: Create Release - uses: actions/create-release@v1 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - with: - tag_name: "v${{ needs.publish.outputs.version }}" - release_name: "${{ vars.APP_NAME }}-v${{ needs.publish.outputs.version }}-b${{ github.run_number }}" - body: | - # ${{ inputs.comment }} + if: inputs.create_release + needs: publish + name: Create Release + runs-on: ubuntu-latest + steps: + - name: Checkout Repository + uses: actions/checkout@v3 + - name: Git Tag Version + uses: yorevs/hspylib/.github/actions/tag-version@master + with: + tag-name: "v${{ needs.publish.outputs.version }}" + github-token: ${{ secrets.GITHUB_TOKEN }} + - name: Create Changelog + id: change-log + uses: yorevs/hspylib/.github/actions/changelog@master + with: + tag-name: "v${{ needs.publish.outputs.version }}" + - name: Create Release + id: create_release + uses: actions/create-release@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + tag_name: "v${{ needs.publish.outputs.version }}" + release_name: "${{ vars.APP_NAME }}-v${{ needs.publish.outputs.version }}-b${{ github.run_number }}" + body: | + # ${{ inputs.comment }} - ${{ steps.change-log.outputs.changelog }} - draft: false - prerelease: false + ${{ steps.change-log.outputs.changelog }} + 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: ./assets/fonts/Droid-Sans-Mono-for-Powerline-Nerd-Font-Complete.zip + asset_name: Droid-Sans-Mono-for-Powerline-Nerd-Font-Complete.zip + asset_content_type: application/zip build-docker-images: if: inputs.build_docker needs: publish uses: yorevs/homesetup/.github/workflows/docker-deploy.yml@master with: - image_tag: "latest" - platforms: "linux/amd64,linux/arm64" + image_tag: ${{ needs.publish.outputs.version }} secrets: inherit