-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: remove global versioning from workflows
- Loading branch information
1 parent
24e75f4
commit c852acc
Showing
1 changed file
with
1 addition
and
54 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 |
---|---|---|
|
@@ -41,41 +41,9 @@ jobs: | |
body: '${{github.event.pull_request.user.login}} is not a PUBLISHER. Please see the .github/PUBLISHERS file...' | ||
}) | ||
- name: Read VERSION into env.RELEASE_VERSION | ||
run: echo RELEASE_VERSION=$(cat VERSION) >> $GITHUB_ENV | ||
|
||
- name: Tag Exists? | ||
id: tag_check | ||
shell: bash -ex {0} | ||
run: | | ||
GET_API_URL="https://api.github.com/repos/${{github.repository}}/git/ref/tags/${{env.RELEASE_VERSION}}" | ||
http_status_code=$(curl -LI $GET_API_URL -o /dev/null -w '%{http_code}\n' -s \ | ||
-H "Authorization: token ${GITHUB_TOKEN}") | ||
if [ "$http_status_code" -ne "404" ] ; then | ||
echo TAG_EXISTS=true >> $GITHUB_ENV | ||
else | ||
echo TAG_EXISTS=false >> $GITHUB_ENV | ||
fi | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Release Already Exists... | ||
if: env.TAG_EXISTS == 'true' | ||
uses: actions/[email protected] | ||
with: | ||
github-token: ${{secrets.GITHUB_TOKEN}} | ||
script: | | ||
github.issues.createComment({ | ||
issue_number: context.issue.number, | ||
owner: context.repo.owner, | ||
repo: context.repo.repo, | ||
body: '[Release Already Exists](https://api.github.com/repos/${{github.repository}}/git/ref/tags/${{env.RELEASE_VERSION}}) (`${{env.RELEASE_VERSION}}`)' | ||
}) | ||
- name: Fail If Conditions Aren't Met... | ||
if: | | ||
env.IS_PUBLISHER != 'true' || | ||
env.TAG_EXISTS != 'false' | ||
env.IS_PUBLISHER != 'true' | ||
run: exit 1 | ||
|
||
CD: | ||
|
@@ -155,24 +123,3 @@ jobs: | |
repo: context.repo.repo, | ||
body: '**[Release PR Created](https://github.com/${{github.repository}}/pull/${{ steps.cpr-cd.outputs.pull-request-number }}) (`${{env.RELEASE_VERSION}}`)**' | ||
}) | ||
- id: changelog | ||
name: "Generate release changelog" | ||
uses: heinrichreimer/[email protected] | ||
with: | ||
unreleasedOnly: true | ||
unreleasedLabel: ${{ env.RELEASE_VERSION }} | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
continue-on-error: true | ||
|
||
- name: Create GitHub Release | ||
id: create_release | ||
uses: actions/create-release@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
tag_name: ${{ env.RELEASE_VERSION }} | ||
release_name: Release ${{ env.RELEASE_VERSION }} | ||
body: ${{ steps.changelog.outputs.changelog }} | ||
draft: true | ||
prerelease: true |