Skip to content

Commit 37f90b1

Browse files
authored
chore: remove global versioning from workflows (#223)
1 parent 24e75f4 commit 37f90b1

File tree

1 file changed

+1
-54
lines changed

1 file changed

+1
-54
lines changed

.github/workflows/cd.yaml

Lines changed: 1 addition & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -41,41 +41,9 @@ jobs:
4141
body: '${{github.event.pull_request.user.login}} is not a PUBLISHER. Please see the .github/PUBLISHERS file...'
4242
})
4343
44-
- name: Read VERSION into env.RELEASE_VERSION
45-
run: echo RELEASE_VERSION=$(cat VERSION) >> $GITHUB_ENV
46-
47-
- name: Tag Exists?
48-
id: tag_check
49-
shell: bash -ex {0}
50-
run: |
51-
GET_API_URL="https://api.github.com/repos/${{github.repository}}/git/ref/tags/${{env.RELEASE_VERSION}}"
52-
http_status_code=$(curl -LI $GET_API_URL -o /dev/null -w '%{http_code}\n' -s \
53-
-H "Authorization: token ${GITHUB_TOKEN}")
54-
if [ "$http_status_code" -ne "404" ] ; then
55-
echo TAG_EXISTS=true >> $GITHUB_ENV
56-
else
57-
echo TAG_EXISTS=false >> $GITHUB_ENV
58-
fi
59-
env:
60-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
61-
62-
- name: Release Already Exists...
63-
if: env.TAG_EXISTS == 'true'
64-
uses: actions/github-script@0.8.0
65-
with:
66-
github-token: ${{secrets.GITHUB_TOKEN}}
67-
script: |
68-
github.issues.createComment({
69-
issue_number: context.issue.number,
70-
owner: context.repo.owner,
71-
repo: context.repo.repo,
72-
body: '[Release Already Exists](https://api.github.com/repos/${{github.repository}}/git/ref/tags/${{env.RELEASE_VERSION}}) (`${{env.RELEASE_VERSION}}`)'
73-
})
74-
7544
- name: Fail If Conditions Aren't Met...
7645
if: |
77-
env.IS_PUBLISHER != 'true' ||
78-
env.TAG_EXISTS != 'false'
46+
env.IS_PUBLISHER != 'true'
7947
run: exit 1
8048

8149
CD:
@@ -155,24 +123,3 @@ jobs:
155123
repo: context.repo.repo,
156124
body: '**[Release PR Created](https://github.com/${{github.repository}}/pull/${{ steps.cpr-cd.outputs.pull-request-number }}) (`${{env.RELEASE_VERSION}}`)**'
157125
})
158-
159-
- id: changelog
160-
name: "Generate release changelog"
161-
uses: heinrichreimer/github-changelog-generator-action@v2.3
162-
with:
163-
unreleasedOnly: true
164-
unreleasedLabel: ${{ env.RELEASE_VERSION }}
165-
token: ${{ secrets.GITHUB_TOKEN }}
166-
continue-on-error: true
167-
168-
- name: Create GitHub Release
169-
id: create_release
170-
uses: actions/create-release@v1
171-
env:
172-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
173-
with:
174-
tag_name: ${{ env.RELEASE_VERSION }}
175-
release_name: Release ${{ env.RELEASE_VERSION }}
176-
body: ${{ steps.changelog.outputs.changelog }}
177-
draft: true
178-
prerelease: true

0 commit comments

Comments
 (0)