-
Notifications
You must be signed in to change notification settings - Fork 503
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Publish single SHA256SUM file with releases
- Loading branch information
Showing
2 changed files
with
41 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,7 +10,39 @@ defaults: | |
shell: bash | ||
|
||
jobs: | ||
release: | ||
manifest: | ||
runs-on: ubuntu-latest | ||
|
||
needs: | ||
- package | ||
|
||
- name: Prerelease Check | ||
id: prerelease | ||
run: | | ||
if [[ ${{ github.ref_name }} =~ ^[0-9]+[.][0-9]+[.][0-9]+$ ]]; then | ||
echo value=false >> $GITHUB_OUTPUT | ||
else | ||
echo value=true >> $GITHUB_OUTPUT | ||
fi | ||
- name: Download Release Archives | ||
env: | ||
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
run: gh release download --repo casey/just --pattern '*' --dir release | ||
|
||
- name: Create Checksums | ||
run: cd release && shasum -a 256 * > ../SHA256SUMS | ||
|
||
- name: Publish Checksums | ||
uses: softprops/[email protected] | ||
with: | ||
draft: false | ||
files: SHA256SUMS | ||
prerelease: ${{ steps.prerelease.outputs.value }} | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
package: | ||
strategy: | ||
matrix: | ||
target: | ||
|
@@ -69,13 +101,13 @@ jobs: | |
run: | | ||
rustup target add aarch64-pc-windows-msvc | ||
- name: Release Type | ||
id: release-type | ||
- name: Prerelease Check | ||
id: prerelease | ||
run: | | ||
if [[ ${{ github.ref }} =~ ^refs/tags/[0-9]+[.][0-9]+[.][0-9]+$ ]]; then | ||
echo value=release >> $GITHUB_OUTPUT | ||
if [[ ${{ github.ref_name }} =~ ^[0-9]+[.][0-9]+[.][0-9]+$ ]]; then | ||
echo value=false >> $GITHUB_OUTPUT | ||
else | ||
echo value=prerelease >> $GITHUB_OUTPUT | ||
echo value=true >> $GITHUB_OUTPUT | ||
fi | ||
- name: Generate Completion Scripts and Manpage | ||
|
@@ -104,10 +136,8 @@ jobs: | |
if: ${{ startsWith(github.ref, 'refs/tags/') }} | ||
with: | ||
draft: false | ||
files: | | ||
${{ steps.package.outputs.archive }} | ||
${{ steps.package.outputs.archive }}.sha256sum | ||
prerelease: ${{ steps.release-type.outputs.value == 'prerelease' }} | ||
files: ${{ steps.package.outputs.archive }} | ||
prerelease: ${{ steps.prerelease.outputs.value }} | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
|
@@ -121,6 +151,6 @@ jobs: | |
with: | ||
draft: false | ||
files: CHANGELOG.md | ||
prerelease: ${{ steps.ref-type.outputs.value != 'release' }} | ||
prerelease: ${{ steps.prerelease.outputs.value }} | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters