Skip to content

Commit b75bbca

Browse files
authored
Add publish step for @edgedb/auth-express (#811)
1 parent 7645820 commit b75bbca

File tree

1 file changed

+59
-0
lines changed

1 file changed

+59
-0
lines changed

.github/workflows/release.yml

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -271,3 +271,62 @@ jobs:
271271
body: ${{steps.github_auth_nextjs_release.outputs.changelog}}
272272
draft: true
273273
prerelease: false
274+
275+
# @edgedb/auth-express
276+
277+
- name: Build @edgedb/auth-express
278+
run: yarn workspace @edgedb/auth-express run build
279+
280+
- id: check_publish_auth_express
281+
name: Dry-run publish '@edgedb/auth-express' to npm
282+
uses: JS-DevTools/npm-publish@4b07b26a2f6e0a51846e1870223e545bae91c552
283+
with:
284+
package: packages/auth-express/package.json
285+
token: ${{ secrets.NPM_TOKEN }}
286+
dry-run: true
287+
288+
- name: If '@edgedb/auth-express' version unchanged
289+
if: steps.check_publish_auth_express.outputs.type == ''
290+
run: |
291+
echo "Version in package.json has not changed. Creating canary release."
292+
yarn workspace @edgedb/auth-express version --no-git-tag-version --minor
293+
CURRENT_VERSION=$(node -p "require('./packages/auth-express/package.json').version")
294+
yarn workspace @edgedb/auth-express version --no-git-tag-version --new-version "${CURRENT_VERSION}-canary.$(date +'%Y%m%dT%H%M%S')"
295+
296+
- name: Publish '@edgedb/auth-express'
297+
uses: JS-DevTools/npm-publish@4b07b26a2f6e0a51846e1870223e545bae91c552
298+
with:
299+
package: packages/auth-express/package.json
300+
token: ${{ secrets.NPM_TOKEN }}
301+
access: public
302+
tag: ${{ steps.check_publish_auth_express.outputs.type == '' && 'canary' || 'latest' }}
303+
304+
- name: Build '@edgedb/auth-express' Changelog
305+
if: steps.check_publish_auth_express.outputs.type != ''
306+
id: github_auth_express_release
307+
uses: mikepenz/release-changelog-builder-action@v3
308+
env:
309+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
310+
with:
311+
fromTag: "${{ env.last_tag }}"
312+
toTag: ${{ github.ref }}
313+
commitMode: true
314+
configurationJson: |
315+
{
316+
"template": "## Commits:\n\n#{{UNCATEGORIZED}}",
317+
"pr_template": "- #{{MERGE_SHA}} #{{TITLE}}",
318+
"categories": []
319+
}
320+
321+
- name: Create '@edgedb/auth-express' Release
322+
if: steps.check_publish_auth_express.outputs.type != ''
323+
uses: actions/create-release@latest
324+
env:
325+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
326+
with:
327+
tag_name: auth-express-v${{ steps.check_publish_auth_express.outputs.version }}
328+
release_name: \@edgedb/auth-express v${{ steps.check_publish_auth_express.outputs.version }}
329+
commitish: ${{ github.ref }}
330+
body: ${{steps.github_auth_express_release.outputs.changelog}}
331+
draft: true
332+
prerelease: false

0 commit comments

Comments
 (0)