Skip to content

Commit

Permalink
ci: update cd for api2teams (#9288)
Browse files Browse the repository at this point in the history
* ci: update cd for api2teams

* ci: update version
  • Loading branch information
KennethBWSong authored Jul 13, 2023
1 parent dac8a89 commit 87ae9e0
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 2 deletions.
20 changes: 19 additions & 1 deletion .github/workflows/api2teams_cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ on:
workflow_dispatch:
inputs:
preid:
description: "preid name(alpha, stable)"
description: "preid name(alpha, rc, stable)"
required: true
default: "alpha"

Expand Down Expand Up @@ -41,12 +41,30 @@ jobs:
run: |
echo "${{ secrets.NPMRC }}" > ~/.npmrc
- name: Version alpha
if: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.preid == 'alpha' }}
working-directory: packages/api2teams/
run: |
npm version prerelease --preid=alpha
- name: Version rc
if: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.preid == 'rc' }}
working-directory: packages/api2teams/
run: |
npm version prerelease --preid=rc
- name: publish alpha release to npm org
if: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.preid == 'alpha' }}
working-directory: packages/api2teams/
run: |
npm publish --tag alpha
- name: publish rc release to npm org
if: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.preid == 'rc' }}
working-directory: packages/api2teams/
run: |
npm publish --tag rc
- name: publish stable release to npm org
if: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.preid == 'stable' }}
working-directory: packages/api2teams/
Expand Down
2 changes: 1 addition & 1 deletion packages/api2teams/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@microsoft/api2teams",
"version": "0.0.1",
"version": "0.1.0-rc",
"description": "openapi spec to teams app",
"main": "index.js",
"author": "Microsoft Corporation",
Expand Down

0 comments on commit 87ae9e0

Please sign in to comment.