Skip to content

Commit

Permalink
Revert "[ci] set --tag on release (#10323)"
Browse files Browse the repository at this point in the history
This reverts commit 50215ae.
  • Loading branch information
FredKSchott committed Mar 6, 2024
1 parent 1d3807a commit af8b04e
Showing 1 changed file with 3 additions and 21 deletions.
24 changes: 3 additions & 21 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ env:

jobs:
changelog:
if: ${{ github.repository_owner == 'withastro' }}
name: Changelog PR or Release
if: ${{ github.repository_owner == 'withastro' }}
runs-on: ubuntu-latest
permissions:
contents: write
Expand All @@ -43,32 +43,14 @@ jobs:

- name: Build Packages
run: pnpm run build

- name: Set PUBLISH_FLAGS variable
id: tag
run: |
BRANCH_NAME="${GITHUB_REF##*/}"
if [ "$BRANCH_NAME" = "main" ]; then
# do not set any flags (`latest` is the default)
echo "PUBLISH_FLAGS=" >> $GITHUB_ENV
elif [ "$BRANCH_NAME" = "next" ]; then
# just use `--tag next`
echo "PUBLISH_FLAGS=--tag next" >> $GITHUB_ENV
else
# extract the integer prefix from the branch name
VERSION_NUMBER="${BRANCH_NAME%%-*}"
# pass a shorthand tag like `--tag v3`
echo "PUBLISH_FLAGS=--tag v$VERSION_NUMBER" >> $GITHUB_ENV
fi

- name: Create Release Pull Request or Publish
id: changesets
uses: changesets/action@v1
with:
# Note: Run custom version script which runs pnpm install
# the install step is necessary to refresh lockfile after versioning
# Note: pnpm install after versioning is necessary to refresh lockfile
version: pnpm run version
publish: pnpm exec changeset publish $PUBLISH_FLAGS
publish: pnpm exec changeset publish
commit: "[ci] release"
title: "[ci] release"
env:
Expand Down

0 comments on commit af8b04e

Please sign in to comment.