Skip to content

Commit

Permalink
--fixup reinstate tag
Browse files Browse the repository at this point in the history
  • Loading branch information
domoscargin committed Jan 22, 2025
1 parent 076bb32 commit 8bbd97d
Showing 1 changed file with 15 additions and 5 deletions.
20 changes: 15 additions & 5 deletions .github/workflows/publish-release-to-github.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand All @@ -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)
Expand Down

0 comments on commit 8bbd97d

Please sign in to comment.