-
Notifications
You must be signed in to change notification settings - Fork 22
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
2a02e44
commit 8119535
Showing
7 changed files
with
21,837 additions
and
9,536 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 |
---|---|---|
@@ -0,0 +1,93 @@ | ||
name: Publish | ||
|
||
on: | ||
release: | ||
types: [published] | ||
|
||
jobs: | ||
publish: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout 🛎️ | ||
uses: actions/checkout@v3 | ||
|
||
- name: Node 🧰 | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: 16.x | ||
cache: 'npm' | ||
|
||
- name: Install 📦 | ||
run: npm ci | ||
|
||
- name: Build 🛠 | ||
run: npm run build:types | ||
|
||
- name: Publish 🚀 PRERELEASE | ||
if: 'github.event.release.prerelease' | ||
run: | | ||
npm config set //registry.npmjs.org/:_authToken=$NODE_AUTH_TOKEN | ||
./node_modules/.bin/lerna publish from-git --dist-tag next --require-scripts --yes | ||
env: | ||
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} | ||
|
||
- name: Publish 🚀 PRODUCTION | ||
if: '!github.event.release.prerelease' | ||
run: | | ||
npm config set //registry.npmjs.org/:_authToken=$NODE_AUTH_TOKEN | ||
./node_modules/.bin/lerna publish from-git --require-scripts --yes | ||
env: | ||
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} | ||
|
||
- name: Post to a Slack channel | ||
id: slack | ||
uses: slackapi/slack-github-action@v1.23.0 | ||
with: | ||
# Slack channel id, channel name, or user id to post message. | ||
# See also: https://api.slack.com/methods/chat.postMessage#channels | ||
# channel-id: 'pipeline' | ||
# For posting a rich message using Block Kit | ||
payload: | | ||
{ | ||
"text": "New release ${{github.ref_name}} for ${{github.event.repository.name}}.", | ||
"blocks": [ | ||
{ | ||
"type": "section", | ||
"text": { | ||
"type": "mrkdwn", | ||
"text": "New release for <${{github.event.repository.html_url}}|`${{github.event.repository.name}}`>\n*<${{github.event.release.html_url}}|release notes>*" | ||
} | ||
}, | ||
{ | ||
"type": "section", | ||
"fields": [ | ||
{ | ||
"type": "mrkdwn", | ||
"text": "*Project:*\n${{github.event.repository.name}}" | ||
}, | ||
{ | ||
"type": "mrkdwn", | ||
"text": "*Version:*\n${{github.ref_name}}" | ||
} | ||
] | ||
}, | ||
{ | ||
"type": "context", | ||
"elements": [ | ||
{ | ||
"type": "image", | ||
"image_url": "${{github.event.sender.avatar_url}}", | ||
"alt_text": "${{github.event.sender.login}}" | ||
}, | ||
{ | ||
"type": "mrkdwn", | ||
"text": "*${{github.event.sender.login}}* has triggered this release." | ||
} | ||
] | ||
} | ||
] | ||
} | ||
env: | ||
SLACK_WEBHOOK_URL: ${{ secrets.PIPELINE_SLACK_CHANNEL_WEBHOOK_URL }} | ||
SLACK_WEBHOOK_TYPE: INCOMING_WEBHOOK |
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 |
---|---|---|
@@ -0,0 +1,21 @@ | ||
name: Release | ||
|
||
on: | ||
push: | ||
tags: ["v*"] | ||
|
||
jobs: | ||
github_release: | ||
name: Trigger GitHub release | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout 🛎️ | ||
uses: actions/checkout@v3 | ||
|
||
- name: Create a draft GitHub release 🎁 | ||
uses: ncipollo/release-action@v1 | ||
with: | ||
draft: true | ||
prerelease: ${{ contains(github.ref, 'beta.') }} | ||
generateReleaseNotes: true | ||
discussionCategory: Announcements |
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 |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
"$schema": "node_modules/lerna/schemas/lerna-schema.json", | ||
"useWorkspaces": true, | ||
"version": "0.0.0" | ||
} |
Oops, something went wrong.