Skip to content

Commit

Permalink
ci(build): also package LICENSE and README into release assets (#6)
Browse files Browse the repository at this point in the history
Signed-off-by: Alexej Disterhoft <[email protected]>
  • Loading branch information
nobbs authored Dec 30, 2023
1 parent 16659fe commit 030e4c1
Showing 1 changed file with 14 additions and 2 deletions.
16 changes: 14 additions & 2 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -84,10 +84,15 @@ jobs:

- name: Compress
run: |
# Copy LICENSE and README.md to artifact directory
mkdir -p ./bin/${{ matrix.goarch }}/${{ matrix.goos }}
cp ./LICENSE ./bin/${{ matrix.goarch }}/${{ matrix.goos }}/
cp ./README.md ./bin/${{ matrix.goarch }}/${{ matrix.goos }}/
# Compress artifact directory contents
tar -czvf \
./kubectl-mapr-ticket-${{ matrix.goarch }}-${{ matrix.goos }}.tar.gz \
-C ./bin/${{ matrix.goarch }}/${{ matrix.goos }}/ \
kubectl-mapr-ticket
-C ./bin/${{ matrix.goarch }}/${{ matrix.goos }}/ .
- name: Upload artifact
if: contains(github.ref, 'tags')
Expand All @@ -97,3 +102,10 @@ jobs:
file: ./kubectl-mapr-ticket-${{ matrix.goarch }}-${{ matrix.goos }}.tar.gz
tag: ${{ github.ref }}
overwrite: true

- name: Upload artifact for PRs
if: ${{ !contains(github.ref, 'tags') }}
uses: actions/upload-artifact@v4
with:
name: kubectl-mapr-ticket-${{ matrix.goarch }}-${{ matrix.goos }}.tar.gz
path: ./kubectl-mapr-ticket-${{ matrix.goarch }}-${{ matrix.goos }}.tar.gz

0 comments on commit 030e4c1

Please sign in to comment.