-
Notifications
You must be signed in to change notification settings - Fork 54
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This diff modifies all the github actions that produce assets to publish on a release called rolling when we are not building a tag. If everything goes as planned, we should be able to provide people with automatically generated fresh binaries for testing. See ooni/probe#2249
- Loading branch information
1 parent
d1b172f
commit 6c11085
Showing
8 changed files
with
53 additions
and
78 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
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
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
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
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
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
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
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 |
---|---|---|
@@ -0,0 +1,25 @@ | ||
#!/bin/bash | ||
set -euo pipefail | ||
|
||
# 1. obtain the github ref of this action run | ||
__ref=${GITHUB_REF:-} | ||
|
||
if [[ $__ref == "" ]]; then | ||
echo "FATAL: missing github ref" 1>&2 | ||
exit 1 | ||
fi | ||
|
||
# 2. determine whether to publish to a release or to rolling | ||
if [[ $__ref =~ ^refs/tags/v ]]; then | ||
__tag=${__ref#refs/tags/} | ||
else | ||
__tag=rolling | ||
fi | ||
|
||
set -x | ||
|
||
# 3. create the release as a pre-release unless it already exists | ||
gh release create -p $__tag --target $GITHUB_SHA || true | ||
|
||
# 4. publish all the assets passed as arguments to the target release | ||
gh release upload $__tag --clobber "$@" |