Release edgedb-js v1.4.1 (#773) #300
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# .github/release.yml | |
name: release | |
on: | |
push: | |
branches: | |
- master | |
jobs: | |
build_and_publish: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
with: | |
fetch-depth: 0 | |
submodules: true | |
- name: Set up Node | |
uses: actions/setup-node@v1 | |
with: | |
node-version: 16 | |
- name: Set up Deno | |
uses: denoland/setup-deno@v1 | |
with: | |
deno-version: v1.30.x | |
- name: Install deps | |
run: yarn | |
- name: Changelog Vars | |
run: | | |
echo "last_tag=$(git describe --tags --abbrev=0)" >> $GITHUB_ENV | |
echo "curr_commit=$(git rev-parse HEAD)" >> $GITHUB_ENV | |
# edgedb | |
- name: Copy readme | |
run: cp README.md packages/driver/README.md | |
- name: Build edgedb | |
run: yarn workspace edgedb run build | |
- id: publish_driver | |
name: Publish 'edgedb' to NPM | |
uses: JS-DevTools/npm-publish@4b07b26a2f6e0a51846e1870223e545bae91c552 | |
with: | |
package: packages/driver/package.json | |
token: ${{ secrets.NPM_TOKEN }} | |
access: public | |
- name: If publish 'edgedb' | |
if: steps.publish_driver.outputs.type != '' | |
run: | | |
echo "Published ${{ steps.publish_driver.outputs.type }} version: ${{ steps.publish_driver.outputs.version }}" | |
- name: If 'edgedb' version unchanged | |
if: steps.publish_driver.outputs.type == '' | |
run: | | |
echo "Version in package.json has not changed. Skipping." | |
- name: Build 'edgedb' Changelog | |
if: steps.publish_driver.outputs.type != '' | |
id: github_driver_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' Release | |
if: steps.publish_driver.outputs.type != '' | |
uses: actions/create-release@latest | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
tag_name: v${{ steps.publish_driver.outputs.version }} | |
release_name: edgedb-js v${{ steps.publish_driver.outputs.version }} | |
commitish: ${{ github.ref }} | |
body: ${{steps.github_driver_release.outputs.changelog}} | |
draft: true | |
prerelease: false | |
# @edgedb/generate | |
- name: Build @edgedb/generate | |
run: yarn workspace @edgedb/generate run build | |
- id: publish_generate | |
name: Publish '@edgedb/generate' to NPM | |
uses: JS-DevTools/npm-publish@4b07b26a2f6e0a51846e1870223e545bae91c552 | |
with: | |
package: packages/generate/package.json | |
token: ${{ secrets.NPM_TOKEN }} | |
access: public | |
- name: If publish '@edgedb/generate' | |
if: steps.publish_generate.outputs.type != '' | |
run: | | |
echo "Published ${{ steps.publish_generate.outputs.type }} version: ${{ steps.publish_generate.outputs.version }}" | |
- name: If '@edgedb/generate' version unchanged | |
if: steps.publish_generate.outputs.type == '' | |
run: | | |
echo "Version in package.json has not changed. Skipping." | |
- name: Build '@edgedb/generate' Changelog | |
if: steps.publish_generate.outputs.type != '' | |
id: github_generate_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/generate' Release | |
if: steps.publish_generate.outputs.type != '' | |
uses: actions/create-release@latest | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
tag_name: generate-v${{ steps.publish_generate.outputs.version }} | |
release_name: \@edgedb/generate v${{ steps.publish_generate.outputs.version }} | |
commitish: ${{ github.ref }} | |
body: ${{steps.github_generate_release.outputs.changelog}} | |
draft: true | |
prerelease: false | |
# @edgedb/auth-core | |
- name: Build @edgedb/auth-core | |
run: yarn workspace @edgedb/auth-core run build | |
- id: publish_auth_core | |
name: Publish '@edgedb/auth-core' to NPM | |
uses: JS-DevTools/npm-publish@4b07b26a2f6e0a51846e1870223e545bae91c552 | |
with: | |
package: packages/auth-core/package.json | |
token: ${{ secrets.NPM_TOKEN }} | |
access: public | |
- name: If publish '@edgedb/auth-core' | |
if: steps.publish_auth_core.outputs.type != '' | |
run: | | |
echo "Published ${{ steps.publish_auth_core.outputs.type }} version: ${{ steps.publish_auth_core.outputs.version }}" | |
- name: If '@edgedb/auth-core' version unchanged | |
if: steps.publish_auth_core.outputs.type == '' | |
run: | | |
echo "Version in package.json has not changed. Skipping." | |
- name: Build '@edgedb/auth-core' Changelog | |
if: steps.publish_auth_core.outputs.type != '' | |
id: github_auth_core_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-core' Release | |
if: steps.publish_auth_core.outputs.type != '' | |
uses: actions/create-release@latest | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
tag_name: auth-core-v${{ steps.publish_auth_core.outputs.version }} | |
release_name: \@edgedb/auth-core v${{ steps.publish_auth_core.outputs.version }} | |
commitish: ${{ github.ref }} | |
body: ${{steps.github_auth_core_release.outputs.changelog}} | |
draft: true | |
prerelease: false | |
# @edgedb/auth-nextjs | |
- name: Build @edgedb/auth-nextjs | |
run: yarn workspace @edgedb/auth-nextjs run build | |
- id: publish_auth_nextjs | |
name: Publish '@edgedb/auth-nextjs' to NPM | |
uses: JS-DevTools/npm-publish@4b07b26a2f6e0a51846e1870223e545bae91c552 | |
with: | |
package: packages/auth-nextjs/package.json | |
token: ${{ secrets.NPM_TOKEN }} | |
access: public | |
- name: If publish '@edgedb/auth-nextjs' | |
if: steps.publish_auth_nextjs.outputs.type != '' | |
run: | | |
echo "Published ${{ steps.publish_auth_nextjs.outputs.type }} version: ${{ steps.publish_auth_nextjs.outputs.version }}" | |
- name: If '@edgedb/auth-nextjs' version unchanged | |
if: steps.publish_auth_nextjs.outputs.type == '' | |
run: | | |
echo "Version in package.json has not changed. Skipping." | |
- name: Build '@edgedb/auth-nextjs' Changelog | |
if: steps.publish_auth_nextjs.outputs.type != '' | |
id: github_auth_nextjs_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-nextjs' Release | |
if: steps.publish_auth_nextjs.outputs.type != '' | |
uses: actions/create-release@latest | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
tag_name: auth-nextjs-v${{ steps.publish_auth_nextjs.outputs.version }} | |
release_name: \@edgedb/auth-nextjs v${{ steps.publish_auth_nextjs.outputs.version }} | |
commitish: ${{ github.ref }} | |
body: ${{steps.github_auth_nextjs_release.outputs.changelog}} | |
draft: true | |
prerelease: false |