Skip to content

Commit

Permalink
create a release and upload release assets
Browse files Browse the repository at this point in the history
  • Loading branch information
sheurich committed Mar 4, 2024
1 parent 62258b7 commit a2ecf0f
Showing 1 changed file with 34 additions and 2 deletions.
36 changes: 34 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ jobs:
-v \
./cmd/${{ matrix.app }}
- name: Display ${{ matrix.app }} artifacts
run: ls -lR /tmp/dist
run: tree /tmp/dist
- name: Store ${{ matrix.app }} artifacts
uses: actions/upload-artifact@v4
with:
Expand All @@ -71,7 +71,7 @@ jobs:
path: /tmp/dist
pattern: ${{ matrix.app }}-*-*
- name: Display ${{ matrix.app }} artifacts
run: ls -lR /tmp/dist
run: tree /tmp/dist
- name: Docker meta
id: meta
uses: docker/metadata-action@v5
Expand Down Expand Up @@ -125,3 +125,35 @@ jobs:
password: ${{ secrets.GITHUB_TOKEN }}
- name: Display pebble version in container image
run: docker run ${{ env.DOCKER_IMAGE_BASENAME }}/pebble:latest -version
create-release:
needs:
- go-build
permissions:
contents: write # Allow creation of a release
runs-on: ubuntu-latest
steps:
- name: Download build artifacts
uses: actions/download-artifact@v4
- name: Display build artifacts
run: tree .
- name: Create release
# https://cli.github.com/manual/gh_release_create
env:
GITHUB_TOKEN: ${{ github.token }}
run: |
gh release create ${{ github.ref_name }} \
--repo ${{ github.repository }} \
--title "${{ github.ref_name }}" \
--verify-tag
continue-on-error: true
- name: Upload release files
# https://cli.github.com/manual/gh_release_upload
env:
GITHUB_TOKEN: ${{ github.token }}
run: |
for artifact in *; do
tar czf ${artifact}.tar.gz ${artifact}
zip -r ${artifact}.zip ${artifact}
gh release upload ${{ github.ref_name }} ${artifact}.* \
--repo ${{ github.repository }};
done

0 comments on commit a2ecf0f

Please sign in to comment.