-
Notifications
You must be signed in to change notification settings - Fork 0
51 lines (49 loc) · 1.86 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
name: dist
on:
push:
branches: [ master ]
pull_request_target:
branches: [ master ]
paths:
- '**.js'
- 'yarn.lock'
jobs:
dist:
runs-on: ubuntu-latest
name: build distributable action
defaults:
run:
shell: bash
steps:
- name: determine source repository (push)
if: ${{ github.event_name == 'push' }}
run: echo "::set-env name=repository::${{ github.repository }}"
- name: determine source repository (PR)
if: ${{ github.event_name != 'push' }}
run: echo "::set-env name=repository::${{ github.event.pull_request.head.repo.full_name }}"
- uses: actions/[email protected]
with:
ref: ${{ github.head_ref }}
repository: ${{ env.repository }}
token: ${{ secrets.PAT }}
- uses: bahmutov/[email protected]
- name: running ncc
run: yarn run ncc build action.js
- 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 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: dist
- 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'