-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
ba95d0f
commit ce70c1e
Showing
1 changed file
with
33 additions
and
0 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 |
---|---|---|
@@ -0,0 +1,33 @@ | ||
name: prereleased | ||
|
||
on: | ||
release: | ||
types: [prereleased] | ||
|
||
jobs: | ||
check-tag-branch: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: get tag commit hash | ||
id: tag-commit-hash | ||
run: echo "::set-output name=tag-hash::${{ github.sha }}" | ||
- name: checkout master | ||
uses: actions/checkout@v2 | ||
with: | ||
ref: master | ||
- name: get latest master commit hash | ||
id: master-commit-hash | ||
run: | | ||
hash=$(git log -n1 --format=format:"%H") | ||
echo "::set-output name=master-hash::${hash}" | ||
- name: exit if tag commit hash doesn't match with the master commit hash | ||
if: steps.tag-commit-hash.outputs.tag-hash != steps.master-commit-hash.outputs.master-hash | ||
run: exit 1 | ||
deploy: | ||
needs: check-tag-branch | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v1 | ||
- name: deploy | ||
run: | | ||
echo "preleased" |