Skip to content

Commit

Permalink
Add publish step for @edgedb/auth-express (#811)
Browse files Browse the repository at this point in the history
  • Loading branch information
scotttrinh authored Dec 15, 2023
1 parent 7645820 commit b75bbca
Showing 1 changed file with 59 additions and 0 deletions.
59 changes: 59 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -271,3 +271,62 @@ jobs:
body: ${{steps.github_auth_nextjs_release.outputs.changelog}}
draft: true
prerelease: false

# @edgedb/auth-express

- name: Build @edgedb/auth-express
run: yarn workspace @edgedb/auth-express run build

- id: check_publish_auth_express
name: Dry-run publish '@edgedb/auth-express' to npm
uses: JS-DevTools/npm-publish@4b07b26a2f6e0a51846e1870223e545bae91c552
with:
package: packages/auth-express/package.json
token: ${{ secrets.NPM_TOKEN }}
dry-run: true

- name: If '@edgedb/auth-express' version unchanged
if: steps.check_publish_auth_express.outputs.type == ''
run: |
echo "Version in package.json has not changed. Creating canary release."
yarn workspace @edgedb/auth-express version --no-git-tag-version --minor
CURRENT_VERSION=$(node -p "require('./packages/auth-express/package.json').version")
yarn workspace @edgedb/auth-express version --no-git-tag-version --new-version "${CURRENT_VERSION}-canary.$(date +'%Y%m%dT%H%M%S')"
- name: Publish '@edgedb/auth-express'
uses: JS-DevTools/npm-publish@4b07b26a2f6e0a51846e1870223e545bae91c552
with:
package: packages/auth-express/package.json
token: ${{ secrets.NPM_TOKEN }}
access: public
tag: ${{ steps.check_publish_auth_express.outputs.type == '' && 'canary' || 'latest' }}

- name: Build '@edgedb/auth-express' Changelog
if: steps.check_publish_auth_express.outputs.type != ''
id: github_auth_express_release
uses: mikepenz/release-changelog-builder-action@v3
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
fromTag: "${{ env.last_tag }}"
toTag: ${{ github.ref }}
commitMode: true
configurationJson: |
{
"template": "## Commits:\n\n#{{UNCATEGORIZED}}",
"pr_template": "- #{{MERGE_SHA}} #{{TITLE}}",
"categories": []
}
- name: Create '@edgedb/auth-express' Release
if: steps.check_publish_auth_express.outputs.type != ''
uses: actions/create-release@latest
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: auth-express-v${{ steps.check_publish_auth_express.outputs.version }}
release_name: \@edgedb/auth-express v${{ steps.check_publish_auth_express.outputs.version }}
commitish: ${{ github.ref }}
body: ${{steps.github_auth_express_release.outputs.changelog}}
draft: true
prerelease: false

0 comments on commit b75bbca

Please sign in to comment.