diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index b639753cf..63b559ef0 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -330,3 +330,62 @@ jobs: body: ${{steps.github_auth_express_release.outputs.changelog}} draft: true prerelease: false + + # @edgedb/auth-remix + + - name: Build @edgedb/auth-remix + run: yarn workspace @edgedb/auth-remix run build + + - id: check_publish_auth_remix + name: Dry-run publish '@edgedb/auth-remix' to npm + uses: JS-DevTools/npm-publish@4b07b26a2f6e0a51846e1870223e545bae91c552 + with: + package: packages/auth-remix/package.json + token: ${{ secrets.NPM_TOKEN }} + dry-run: true + + - name: If '@edgedb/auth-remix' version unchanged + if: steps.check_publish_auth_remix.outputs.type == '' + run: | + echo "Version in package.json has not changed. Creating canary release." + yarn workspace @edgedb/auth-remix version --no-git-tag-version --minor + CURRENT_VERSION=$(node -p "require('./packages/auth-remix/package.json').version") + yarn workspace @edgedb/auth-remix version --no-git-tag-version --new-version "${CURRENT_VERSION}-canary.$(date +'%Y%m%dT%H%M%S')" + + - name: Publish '@edgedb/auth-remix' + uses: JS-DevTools/npm-publish@4b07b26a2f6e0a51846e1870223e545bae91c552 + with: + package: packages/auth-remix/package.json + token: ${{ secrets.NPM_TOKEN }} + access: public + tag: ${{ steps.check_publish_auth_remix.outputs.type == '' && 'canary' || 'latest' }} + + - name: Build '@edgedb/auth-remix' Changelog + if: steps.check_publish_auth_remix.outputs.type != '' + id: github_auth_remix_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-remix' Release + if: steps.check_publish_auth_remix.outputs.type != '' + uses: actions/create-release@latest + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + tag_name: auth-remix-v${{ steps.check_publish_auth_remix.outputs.version }} + release_name: \@edgedb/auth-remix v${{ steps.check_publish_auth_remix.outputs.version }} + commitish: ${{ github.ref }} + body: ${{steps.github_auth_remix_release.outputs.changelog}} + draft: true + prerelease: false