forked from milesj/docusaurus-plugin-typedoc-api
-
Notifications
You must be signed in to change notification settings - Fork 1
61 lines (49 loc) · 1.59 KB
/
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
name: Release @latest
env:
YARN_IGNORE_NODE: 1
RETRY_TESTS: 1
on:
workflow_dispatch:
jobs:
release:
name: 'Release'
if:
(!contains(github.event.head_commit.message, '[skip ci]') &&
!contains(github.event.head_commit.message, 'docs:'))
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
token: ${{ secrets.APIFY_SERVICE_ACCOUNT_GITHUB_TOKEN }}
fetch-depth: 0
- name: Use Node.js 20
uses: actions/setup-node@v4
with:
node-version: 20
- name: Enable corepack
run: |
corepack enable
corepack prepare yarn@stable --activate
- name: Activate cache for Node.js 20
uses: actions/setup-node@v4
with:
cache: 'yarn'
- name: Install Dependencies
run: yarn --immutable
- name: Build
run: yarn build:deploy
- name: Setup git user and npm
run: |
git config --global user.name "Apify Release Bot"
git config --global user.email "[email protected]"
echo "access=public" > ~/.npmrc
echo "//registry.npmjs.org/:_authToken=${{ secrets.APIFY_SERVICE_ACCOUNT_NPM_TOKEN }}" >> ~/.npmrc
- name: Publish to npm
run: |
cd ./packages/plugin
npm publish --access public
env:
NPM_TOKEN: ${{ secrets.APIFY_SERVICE_ACCOUNT_NPM_TOKEN }}
GIT_USER: '[email protected]:${{ secrets.APIFY_SERVICE_ACCOUNT_GITHUB_TOKEN }}'
GH_TOKEN: ${{ secrets.APIFY_SERVICE_ACCOUNT_GITHUB_TOKEN }}