-
Notifications
You must be signed in to change notification settings - Fork 339
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
076bb32
commit 8bbd97d
Showing
1 changed file
with
15 additions
and
5 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 |
---|---|---|
|
@@ -30,15 +30,25 @@ jobs: | |
git config user.name 'github-actions[bot]' | ||
git config user.email 'github-actions[bot]@users.noreply.github.com' | ||
- name: Get current version | ||
id: get-version | ||
- name: Create GitHub tag | ||
id: create-github-tag | ||
run: | | ||
ALL_PACKAGE_VERSION=$(npm run version --silent --workspace govuk-frontend) | ||
TAG="v5.8.1-internal.0" | ||
echo "GH_TAG=${TAG}" >> $GITHUB_OUTPUT | ||
if [ $(git tag -l "$TAG") ]; then | ||
echo "⚠️ Tag $TAG already exists. Please delete $TAG via the GitHub UI and re-run this workflow" | ||
exit 1 | ||
else | ||
echo "🗒 Tagging repo using tag version: $TAG ..." | ||
git tag -a $TAG -m "GOV.UK Frontend release $TAG" | ||
git push https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/${{ github.repository }} --tags | ||
echo "🗒 Tag $TAG created and pushed to remote." | ||
echo "GH_TAG=${TAG}" >> $GITHUB_OUTPUT | ||
fi | ||
- name: Create GitHub archive | ||
run: git archive -o ./release-${{ steps.get-version.outputs.GH_TAG }}.zip HEAD:dist | ||
run: git archive -o ./release-${{ steps.create-github-tag.outputs.GH_TAG }}.zip HEAD:dist | ||
|
||
- name: Generate release notes | ||
uses: actions/[email protected] | ||
|
@@ -50,7 +60,7 @@ jobs: | |
- name: Create GitHub release | ||
run: | | ||
GH_TAG=${{ steps.get-version.outputs.GH_TAG }} | ||
GH_TAG=${{ steps.create-github-tag.outputs.GH_TAG }} | ||
RELEASE_NAME="GOV.UK Frontend $GH_TAG" | ||
RELEASE_BODY=$(cat release-notes-body) | ||
|