Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add publish step for @edgedb/auth-express #811

Merged
merged 1 commit into from
Dec 15, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading