forked from OfficeDev/teams-toolkit
-
Notifications
You must be signed in to change notification settings - Fork 0
83 lines (72 loc) · 2.46 KB
/
bump-release.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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
name: bump version
on:
workflow_dispatch:
inputs:
force:
description: 'force release even if no update(set empty if not)'
required: false
default: '--force-publish'
version:
description: 'which version to bump(premajor, preminor, prepatch)'
required: true
default: 'preminor'
jobs:
release:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
token: ${{ secrets.CD_PAT }}
ref: ${{ github.ref }}
- name: Setup node
uses: actions/[email protected]
with:
node-version: 14
- name: Setup npm registry
run: |
echo "${{ secrets.NPMRC }}" > ~/.npmrc
- name: Download Simple Auth bits
uses: nick-invision/retry@v2
with:
timeout_minutes: 10
max_attempts: 5
retry_on: error
shell: pwsh
command: |
$version=Get-Content packages/fx-core/templates/plugins/resource/simpleauth/version.txt
$tag = "simpleauth@"+$version
$fileName="Microsoft.TeamsFx.SimpleAuth_$version.zip"
$url = "https://github.com/OfficeDev/TeamsFx/releases/download/"+$tag+"/"+$fileName
Invoke-WebRequest $url -OutFile packages/fx-core/templates/plugins/resource/simpleauth/SimpleAuth.zip
- name: Setup project
run: |
npm run setup
- name: Setup git
run: |
git config --global user.name 'MSFT-yiz'
git config --global user.email '[email protected]'
- name: release npm packages to npmjs.org
if: ${{ github.event.inputs.stable == 'false' }}
run: |
npx lerna publish --no-private --preid=alpha --dist-tag=alpha ${{ github.event.inputs.version }} --yes ${{ github.event.inputs.force }}
- name: pack vsix
uses: nick-invision/retry@v2
with:
timeout_minutes: 10
max_attempts: 5
retry_on: error
command: |
cd ./packages/vscode-extension
npm install
npx vsce package
- name: release VSCode extension to github
if: ${{ github.event.inputs.stable == 'true' }}
uses: marvinpinto/action-automatic-releases@latest
with:
repo_token: "${{ secrets.CD_PAT }}"
automatic_release_tag: "daily"
prerelease: true
files: |
./packages/**/*.vsix