Skip to content

Commit

Permalink
Fix release 1d59f71
Browse files Browse the repository at this point in the history
  • Loading branch information
leordev committed May 7, 2024
1 parent 1d59f71 commit cd5f696
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 33 deletions.
29 changes: 5 additions & 24 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ on:
push:
branches:
- main
# forcing release because of the issue documented here:
# https://github.com/TBD54566975/web5-js/pull/517
- release-1d59f714

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
Expand Down Expand Up @@ -74,6 +77,8 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
KICK_API_RELEASE: ${{ github.event.inputs.initiate_api_release || '' }}

# forcing release because of the issue documented here:
# https://github.com/TBD54566975/web5-js/pull/517
- name: Create Release Pull Request or Publish to npm
uses: changesets/action@aba318e9165b45b7948c60273e0b72fce0a64eb9 # v1.4.7
id: changesets
Expand All @@ -86,30 +91,6 @@ jobs:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

- name: Label Changesets PR with API release
if: github.event.inputs.initiate_api_release && steps.changesets.outputs.pullRequestNumber != ''
uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1
with:
script: |
github.rest.issues.addLabels({
issue_number: ${{ steps.changesets.outputs.pullRequestNumber }},
owner: context.repo.owner,
repo: context.repo.repo,
labels: ['api-release']
})
- name: Publish `next` preview
if: steps.changesets.outputs.published != 'true' && steps.changesets.outputs.pullRequestNumber != '' && steps.changesets.outputs.hasChangesets == 'true'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
run: |
git checkout main
SHORT_SHA=$(git rev-parse --short HEAD)
pnpm changeset version --snapshot next-$SHORT_SHA
pnpm changeset publish --no-git-tag --tag next
publish-docs:
permissions:
contents: write
Expand Down
9 changes: 0 additions & 9 deletions scripts/changesets-api-release-check.sh
Original file line number Diff line number Diff line change
Expand Up @@ -34,12 +34,3 @@ if [[ -n $API_RELEASE_PR || $KICK_API_RELEASE == "true" ]]; then
echo "release_web5_api=$RELEASE_WEB5_API" >> $GITHUB_OUTPUT
exit 0
fi

if [[ $API_RELEASES_COUNT == $ALL_RELEASES_COUNT ]]; then
echo "Only @web5/api release detected, checking for API Release labeled PR or Kick trigger..."
if [[ -z $RELEASE_WEB5_API ]]; then
echo "No API Release labeled PR found and KICK_API_RELEASE is false, skipping the release..."
echo "skip_release=true" >> $GITHUB_OUTPUT
exit 0
fi
fi

0 comments on commit cd5f696

Please sign in to comment.