Skip to content

Commit

Permalink
🤖 refine generating releases
Browse files Browse the repository at this point in the history
  • Loading branch information
ttytm committed Jun 12, 2024
1 parent 19955a3 commit 5055645
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,15 +54,15 @@ jobs:
- name: Prepare artifacts
run: |
mkdir "${{ matrix.target }}"
binary=wthrr
artifact=wthrr-${{ matrix.target }}
if [[ $RUNNER_OS == "Windows" ]]; then
binary+=.exe
artifact+=.exe
elif [[ $RUNNER_OS == "Linux" ]]; then
mv ./target/appimage/wthrr.AppImage "./${{ matrix.target }}/"
mv ./target/debian/wthrr*.deb "./${{ matrix.target }}/wthrr.deb"
mv ./target/appimage/wthrr.AppImage "./${{ matrix.target }}/$artifact.AppImage"
mv ./target/debian/wthrr*.deb "./${{ matrix.target }}/$artifact.deb"
fi
mv "./target/release/$binary" "./${{ matrix.target }}/"
echo "ARTIFACT=wthrr-${{ matrix.target }}" >> "$GITHUB_ENV"
mv "./target/release/$binary" "./${{ matrix.target }}/$artifact"
echo "ARTIFACT=$artifact" >> "$GITHUB_ENV"
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
Expand All @@ -77,8 +77,8 @@ jobs:
{
echo "IS_PRERELEASE=true";
echo "TAG=nightly";
echo "BODY=Generated on <samp>$(date -u +'%Y-%m-%d %H:%M:%S UTC')</samp> from commit $GITHUB_SHA.";
echo "TITLE=wthrr nightly build";
echo "TITLE=nightly build $(date -u +'%Y-%m-%d %H:%M:%S UTC')";
echo "BODY=Generated from commit $GITHUB_SHA.";
} >> "$GITHUB_ENV"
fi
- name: Update nightly tag
Expand All @@ -92,7 +92,7 @@ jobs:
if: github.repository_owner == 'ttytm' && github.ref_name == 'main' && github.event_name == 'push'
uses: ncipollo/release-action@v1
with:
artifacts: ${{ matrix.target }}/wthrr*
artifacts: ${{ env.ARTIFACT }}*
tag: ${{ env.TAG }}
body: ${{ env.BODY }}
name: ${{ env.TITLE }}
Expand Down

0 comments on commit 5055645

Please sign in to comment.