-
Notifications
You must be signed in to change notification settings - Fork 0
98 lines (95 loc) · 3.5 KB
/
dist.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
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
name: rebuild
on:
push:
branches: [ master ]
paths:
- '**.ts'
- '**.js'
- '**/package.json'
- '**/pnpm-lock.yaml'
- '**/dist.yml'
pull_request_target:
branches: [ master ]
paths:
- '**.ts'
- '**.js'
- '**/package.json'
- '**/pnpm-lock.yaml'
- '**/dist.yml'
jobs:
distributables:
runs-on: ${{ matrix.os }}
defaults:
run:
shell: bash
strategy:
matrix:
node-version: [ 12.x ]
os: [ ubuntu-latest ]
pnpm-version: [ 5.7.0 ]
name: node.js ${{ matrix.node-version }}
steps:
- name: checkout code
uses: actions/[email protected]
with:
repository: ${{ github.event.pull_request.head.repo.full_name }}
ref: ${{ github.head_ref }}
token: ${{ secrets.BOT }}
- name: setup node.js ${{ matrix.node-version }}
uses: actions/[email protected]
with:
node-version: ${{ matrix.node-version }}
- name: cache node modules
uses: actions/[email protected]
with:
path: |
**/node_modules
**/.putoutcache
key: ${{ runner.OS }}-${{ matrix.node-version }}-${{ hashFiles('/pnpm-lock.yaml') }}-${{ matrix.pnpm-version }}
restore-keys: |
${{ runner.OS }}-${{ matrix.node-version }}-${{ hashFiles('/pnpm-lock.yaml') }}-${{ matrix.pnpm-version }}
${{ runner.OS }}-${{ matrix.node-version }}-${{ hashFiles('/pnpm-lock.yaml') }}
${{ runner.OS }}-${{ matrix.node-version }}
- name: setup pnpm
uses: pnpm/[email protected]
with:
version: ${{ matrix.pnpm-version }}
run_install: |
- recursive: true
args: [--frozen-lockfile, --strict-peer-dependencies]
- name: determine ncc cache dir and version
run: |
echo "::set-env name=ncc-cache::$(pnpx ncc cache dir)"
echo "::set-env name=ncc-version::$(pnpx ncc version)"
- name: cache ncc
uses: actions/[email protected]
with:
path: ${{ env.ncc-cache }}
key: ${{ runner.OS }}-${{ matrix.node-version }}-${{ env.ncc-version }}-${{ hashFiles('**/*.ts') }}
restore-keys: |
${{ runner.OS }}-${{ matrix.node-version }}-${{ env.ncc-version }}-${{ hashFiles('**/*.ts') }}
${{ runner.OS }}-${{ matrix.node-version }}-${{ env.ncc-version }}
- name: build
run: pnpm build
- name: creating pull request
if: ${{ github.head_ref == '' }}
uses: peter-evans/[email protected]
with:
commit-message: 'chore(dist): update the distributed action script'
title: 'chore(dist): Update the distributed action script'
body: |
This pull requests updates the distributed version of the action script as described in the [GitHub Action docs](https://docs.github.com/en/actions/creating-actions/creating-a-javascript-action).
Every update on the main branche will cause an update of this pull request.
It only needs to be merged once a release is due.
labels: |
chore
branch: distributable
token: ${{ secrets.BOT }}
- name: committing changed files
if: ${{ github.head_ref != '' }}
uses: stefanzweifel/[email protected]
with:
commit_message: 'chore(dist): update the distributed action script'
file_pattern: |
dist/index.js
dist/index.js.map