-
-
Notifications
You must be signed in to change notification settings - Fork 58
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
78d4a34
commit 62b38aa
Showing
1 changed file
with
38 additions
and
14 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -25,7 +25,7 @@ jobs: | |
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Use Node.js 14 | ||
- name: Use Node.js 16 | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: 16 | ||
|
@@ -111,23 +111,51 @@ jobs: | |
auto-merge: | ||
if: | | ||
always() && | ||
github.event_name == 'pull_request' && | ||
github.event.pull_request.user.login == 'foxriver76' && | ||
github.event.pull_request.base.ref == 'master' && | ||
startsWith(github.event.pull_request.title, '[NIGHTLY DEV RELEASE]') | ||
github.event_name == 'pull_request' | ||
needs: [ ci ] | ||
runs-on: ubuntu-latest | ||
steps: | ||
- id: automerge | ||
name: automerge | ||
uses: "pascalgn/[email protected]" | ||
env: | ||
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}" | ||
MERGE_LABELS: "automated pr" | ||
MERGE_FILTER_AUTHOR: "foxriver76" | ||
MERGE_FORKS: "false" | ||
MERGE_DELETE_BRANCH: "false" | ||
UPDATE_LABELS: "automated pr" | ||
MERGE_METHOD: "squash" | ||
|
||
- name: Checkout repository | ||
if: steps.automerge.outputs.mergeResult == 'merged' | ||
uses: actions/checkout@v3 | ||
|
||
- name: Use Node.js 16 | ||
if: steps.automerge.outputs.mergeResult == 'merged' | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: 16 | ||
|
||
- name: Determine version | ||
if: steps.automerge.outputs.mergeResult == 'merged' | ||
id: version | ||
uses: actions/github-script@v6 | ||
with: | ||
result-encoding: string | ||
script: | | ||
return require(`${process.env.GITHUB_WORKSPACE}/lerna.json`).version; | ||
- name: Install dependencies | ||
if: steps.automerge.outputs.mergeResult == 'merged' | ||
run: npm ci --ignore-scripts # install typescript and @types do not `setup first` | ||
|
||
- name: Build TS files | ||
if: steps.automerge.outputs.mergeResult == 'merged' | ||
run: npm run build | ||
|
||
- name: Publish npm | ||
if: steps.automerge.outputs.mergeResult == 'merged' | ||
env: | ||
VERSION: ${{ steps.version.outputs.result }} | ||
run: | | ||
|
@@ -137,6 +165,7 @@ jobs: | |
npx lerna publish from-package --yes --dist-tag dev | ||
- name: Create Github Release for Nightly | ||
if: steps.automerge.outputs.mergeResult == 'merged' | ||
uses: ncipollo/release-action@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|
@@ -147,7 +176,8 @@ jobs: | |
prerelease: true | ||
body: 'nightly release' | ||
|
||
- name: Notify Sentry.io about the Nightly release# | ||
- name: Notify Sentry.io about the Nightly release | ||
if: steps.automerge.outputs.mergeResult == 'merged' | ||
env: | ||
VERSION: ${{ steps.version.outputs.result }} | ||
run: | | ||
|
@@ -161,12 +191,6 @@ jobs: | |
sentry-cli releases set-commits $SENTRY_VERSION --auto | ||
sentry-cli releases finalize $SENTRY_VERSION | ||
- name: automerge | ||
uses: "pascalgn/[email protected]" | ||
env: | ||
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}" | ||
MERGE_METHOD: "squash" | ||
|
||
# Deploys the final package to NPM when a versioned tag was pushed | ||
deploy: | ||
needs: [ci] | ||
|
@@ -180,7 +204,7 @@ jobs: | |
runs-on: ubuntu-20.04 | ||
strategy: | ||
matrix: | ||
node-version: [14] | ||
node-version: [16] | ||
|
||
steps: | ||
- name: Checkout code | ||
|