-
Notifications
You must be signed in to change notification settings - Fork 8
38 lines (36 loc) · 1.44 KB
/
publish.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
name: publish
on:
workflow_dispatch:
inputs:
header:
description: Optional release notes header text
footer:
description: Optional release notes footer text
tags:
# This can be used either to publish releases for old tags, or to skip releasing (by setting the field to a non-existent tag)
description: Comma-separated list of tags. If not set, tags pointing at HEAD will be used.
jobs:
run:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: 14.x
- name: publish
env:
# referenced in common/config/rush/.npmrc-publish
NPM_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }}
run: |
git config --global user.email "${{ github.actor }}@users.noreply.github.com"
git config --global user.name "${{ github.actor }}"
git remote set-url origin "https://${{ github.actor }}:${{ secrets.GH_CI_TOKEN }}@github.com/${{ github.repository }}.git"
node common/scripts/install-run-rush.js install
node common/scripts/install-run-rush.js build
node common/scripts/install-run-rush.js publish --target-branch main --publish --apply
- name: create github release
uses: actions/github-script@v3
with:
script: |
const rig = require(`${process.env.GITHUB_WORKSPACE}/tools/rig`)
return rig.createGitHubRelease({ context, github })