Fix IS_RELEASE, return to raw expression, use notice instead of debug

This commit is contained in:
2024-10-05 18:59:37 -05:00
parent 398004daca
commit 7e89218e31

View File

@@ -119,7 +119,6 @@ jobs:
echo "ARCHIVE=spotify-quickauth-v${{ env.RELEASE_VERSION }}-${{ matrix.target }}.tar.gz" >> $GITHUB_ENV echo "ARCHIVE=spotify-quickauth-v${{ env.RELEASE_VERSION }}-${{ matrix.target }}.tar.gz" >> $GITHUB_ENV
fi fi
echo "ARCHIVE_DIR=target/${{ matrix.target }}/release" >> $GITHUB_ENV echo "ARCHIVE_DIR=target/${{ matrix.target }}/release" >> $GITHUB_ENV
echo "IS_RELEASE=${{startsWith(github.ref, 'refs/tags/')}}" >> $GITHUB_ENV
- name: Archive - name: Archive
if: ${{ !contains(matrix.os, 'windows') }} if: ${{ !contains(matrix.os, 'windows') }}
@@ -142,19 +141,20 @@ jobs:
spotify-quickauth.exe spotify-quickauth.exe
- name: Install rsign2 - name: Install rsign2
if: env.IS_RELEASE if: startsWith(github.ref, 'refs/tags/')
uses: taiki-e/install-action@v2 uses: taiki-e/install-action@v2
with: with:
tool: rsign2 tool: rsign2
- name: Sign Archive - name: Sign Archive
if: env.IS_RELEASE if: startsWith(github.ref, 'refs/tags/')
env: env:
MINISIGN_KEY: ${{ secrets.MINISIGN_KEY }} MINISIGN_KEY: ${{ secrets.MINISIGN_KEY }}
ARCHIVE_PATH: ${{ env.ARCHIVE_DIR }}/${{ env.ARCHIVE }} ARCHIVE_PATH: ${{ env.ARCHIVE_DIR }}/${{ env.ARCHIVE }}
shell: bash shell: bash
run: | run: |
echo "::debug:: length = $(echo -n "$MINISIGN_KEY" | wc -c)" echo "::notice:: length = $(echo -n $MINISIGN_KEY | wc -c)"
echo "::notice:: length = $(echo -n "$MINISIGN_KEY" | wc -c)"
echo "$MINISIGN_KEY" > minisign.key echo "$MINISIGN_KEY" > minisign.key
ts=$(node -e 'console.log((new Date).toISOString())') ts=$(node -e 'console.log((new Date).toISOString())')
@@ -164,7 +164,7 @@ jobs:
rsign sign -W -s minisign.key -x "${{ env.ARCHIVE_PATH }}.sig" -t "$comment" "${{ env.ARCHIVE_PATH }}" rsign sign -W -s minisign.key -x "${{ env.ARCHIVE_PATH }}.sig" -t "$comment" "${{ env.ARCHIVE_PATH }}"
- name: Upload Artifact - name: Upload Artifact
if: ${{ !env.IS_RELEASE }} if: ${{ !startsWith(github.ref, 'refs/tags/') }}
uses: actions/upload-artifact@v4 uses: actions/upload-artifact@v4
with: with:
name: spotify-quickauth-v${{ env.RELEASE_VERSION }}-${{ matrix.target }} name: spotify-quickauth-v${{ env.RELEASE_VERSION }}-${{ matrix.target }}
@@ -174,7 +174,7 @@ jobs:
- name: Release - name: Release
uses: softprops/action-gh-release@v2 uses: softprops/action-gh-release@v2
if: env.IS_RELEASE if: startsWith(github.ref, 'refs/tags/')
with: with:
files: | files: |
${{ env.ARCHIVE_DIR }}/${{ env.ARCHIVE }} ${{ env.ARCHIVE_DIR }}/${{ env.ARCHIVE }}
@@ -182,9 +182,9 @@ jobs:
generate_release_notes: true generate_release_notes: true
- name: cargo login - name: cargo login
if: env.IS_RELEASE if: startsWith(github.ref, 'refs/tags/')
run: cargo login ${{ secrets.CRATES_IO_API_TOKEN }} run: cargo login ${{ secrets.CRATES_IO_API_TOKEN }}
- name: "cargo release publish" - name: "cargo release publish"
if: env.IS_RELEASE if: startsWith(github.ref, 'refs/tags/')
run: cargo release publish --workspace --all-features --allow-branch HEAD --no-confirm --no-verify --execute run: cargo release publish --workspace --all-features --allow-branch HEAD --no-confirm --no-verify --execute