-
Notifications
You must be signed in to change notification settings - Fork 24
42 lines (38 loc) · 1.21 KB
/
retract.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
name: Retract Release
on:
issue_comment:
types: [created]
jobs:
retract:
runs-on: ubuntu-latest
name: Retract a release
# not a pull request and has `#contains` on a line by itself
# fromJSON is used to process escape sequences
if: |
!github.event.issue.pull_request &&
contains(
format(fromJSON('"\r\n{0}\r\n"'), github.event.comment.body),
fromJSON('"\r\n#retract\r\n"')
)
steps:
- name: Get repo contents
uses: actions/checkout@v3
with:
path: .__publish__
- name: Setup Node
uses: actions/setup-node@v3
with:
node-version: 14
cache: yarn
cache-dependency-path: .__publish__/yarn.lock
- name: Install yarn dependencies
run: yarn install --cwd ".__publish__"
- name: Parse and set inputs
id: inputs
run: node .__publish__/src/publish/inputs.js
- name: Comment and close
if: ${{ fromJSON(steps.inputs.outputs.result).requester == github.event.sender.login }}
env:
PUBLISH_ARGS: ${{ steps.inputs.outputs.result }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: node .__publish__/src/publish/retract.js