Skip to content

Commit

Permalink
Fix release upload
Browse files Browse the repository at this point in the history
Signed-off-by: Vasyl Gello <vasek.gello@gmail.com>
  • Loading branch information
basilgello committed Aug 5, 2024
1 parent 98b1a1c commit 873b19b
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions .github/workflows/trunk.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,8 @@ jobs:
- name: Check if commit needs a release upload
run: |
if [ "${{ github.ref_type }}" = "tag" ]; then
echo "PRERELEASE=''" >> "$GITHUB_ENV"
echo "RELEASE_NAME='${{ github.ref_name }}'" >> "$GITHUB_ENV"
elif "${{ github.ref }}" = "refs/heads/develop" ]; then
echo "RELEASENAME=${{ github.ref_name }}" >> "$GITHUB_ENV"
elif [ "${{ github.ref }}" = "refs/heads/develop" ]; then
echo "PRERELEASE=--prerelease" >> "$GITHUB_ENV"
echo "RELEASENAME=trunk" >> "$GITHUB_ENV"
else
Expand Down Expand Up @@ -233,9 +232,9 @@ jobs:
#echo "::endgroup::"
- name: Publish release
if: ${{ env.SKIP_UPLOAD != '1' }}
if: ${{ env.SKIP_UPLOAD == '' }}
run: |
gh release create "${{ env.RELEASENAME }}" "${{ env.PRERELEASE }}" yggstack-* || gh release upload "${{ env.RELEASENAME }}" yggstack-* --clobber
gh release create "${{ env.RELEASENAME }}" ${{ env.PRERELEASE }} yggstack-* || gh release upload "${{ env.RELEASENAME }}" yggstack-* --clobber
env:
GH_TOKEN: ${{ github.token }}

Expand All @@ -244,15 +243,15 @@ jobs:
uses: docker/setup-buildx-action@v3

- name: Login to GitHub Container Registry
if: ${{ env.SKIP_UPLOAD != '1' }}
if: ${{ env.SKIP_UPLOAD == '' }}
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Build and push yggstack container image
if: ${{ env.SKIP_UPLOAD != '1' }}
if: ${{ env.SKIP_UPLOAD == '' }}
uses: docker/build-push-action@v6
with:
context: .
Expand Down

0 comments on commit 873b19b

Please sign in to comment.