chore: Automate releases (#3736)

* chore: Automate releases

* Update release.yml
This commit is contained in:
Oliver Windall Juhl
2023-04-10 09:51:14 +02:00
committed by GitHub
parent 085fedb1f7
commit 5280e1bdad
3 changed files with 53 additions and 1 deletions

View File

@@ -5,10 +5,14 @@
"fixed": [],
"linked": [],
"access": "public",
"baseBranch": "master",
"baseBranch": "develop",
"updateInternalDependencies": "patch",
"ignore": ["integration-tests-api", "integration-tests-plugins", "integration-tests-repositories"],
"snapshot": {
"useCalculatedVersion": true
},
"___experimentalUnsafeOptions_WILL_CHANGE_IN_PATCH": {
"onlyUpdatePeerDependentsWhenOutOfRange": true
}
}

46
.github/workflows/release.yml vendored Normal file
View File

@@ -0,0 +1,46 @@
name: Release
on:
push:
branches:
- develop
concurrency: ${{ github.workflow }}-${{ github.ref }}
jobs:
release:
name: Version packages PR
runs-on: ubuntu-latest
steps:
- name: Checkout Repo
uses: actions/checkout@v3
- name: Setup Node.js 16
uses: actions/setup-node@v3
with:
node-version: 16
- name: Creating .npmrc
run: |
cat << EOF > "$HOME/.npmrc"
//registry.npmjs.org/:_authToken=$NPM_TOKEN
EOF
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: Install Dependencies
run: yarn
- name: Build packages
run: yarn build
- name: Create Release Pull Request
uses: changesets/action@v1
with:
version: yarn version
publish: yarn release
commit: "chore: Release"
title: "chore: Release"
createGithubReleases: false
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

View File

@@ -86,6 +86,8 @@
"develop:create:db": "ts-node --transpile-only ./integration-tests/development/create-database.js",
"release:next": "changeset publish --no-git-tags --snapshot --tag next",
"version:next": "changeset version --snapshot next",
"release": "changeset publish",
"version": "changeset version && yarn install --no-immutable",
"check:freshness": "node ./scripts/freshness-check.js"
},
"dependencies": {