-
-
Notifications
You must be signed in to change notification settings - Fork 16
48 lines (46 loc) · 1.5 KB
/
release-jsr.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
name: Version and release mm-jsr
on:
workflow_dispatch:
inputs:
version:
description: 'Version of release'
required: true
jobs:
unit-tests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
- run: yarn test
working-directory: ./packages/mm-jsr
release:
needs: unit-tests
if: ${{ github.ref == 'refs/heads/master' }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- uses: actions/setup-node@v2
- run: yarn build
working-directory: ./packages/mm-jsr
- run: git config --global user.email "[email protected]"
- run: git config --global user.name "GH Actions"
- run: yarn version --new-version ${{ github.event.inputs.version }} --no-git-tag-version
working-directory: ./packages/mm-jsr
- run: git commit -a -m "[mm-jsr] v${{ github.event.inputs.version }}"
- run: git tag v${{ github.event.inputs.version }}
- run: echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}" > ~/.npmrc
- run: cp ../../README.md .
working-directory: ./packages/mm-jsr
- run: npm publish
working-directory: ./packages/mm-jsr
- name: Push changes
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
branch: ${{ github.ref }}
tags: true
docs:
needs: release
uses: ./.github/workflows/docs.yml