Skip to content

Working on workflow to enrich release assets with a custom zip, need help #144232

Closed Answered by PatchaIT
PatchaIT asked this question in Actions
Discussion options

You must be logged in to vote

I resolved adopting this one:

name: GH Upload Release Asset On Release Publish

on:
  release:
    types: [published]
    branches:
      - '*'

jobs:
  build:
    name: Upload Release Asset
    runs-on: ubuntu-latest
    steps:
      - name: Checkout Code
        uses: actions/checkout@v4
      - name: Build Release Asset
        run: |
          rsync -Rr --exclude=".*" . ./Greetings
          zip -r Greetings_${{ github.ref_name }}.zip Greetings
          rm -r Greetings
      - name: View Release Asset
        run: |
          unzip -l Greetings_${{ github.ref_name }}.zip
      - name: Upload Release Asset
        id: upload_release_asset
        uses: softprops/action-gh-release@v2

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by PatchaIT
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Actions Build, test, and automate your deployment pipeline with world-class CI/CD Question
1 participant