-
Notifications
You must be signed in to change notification settings - Fork 21
35 lines (31 loc) · 1.25 KB
/
pr.yaml
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
on: pull_request
jobs:
release:
name: Create PR build
runs-on: ubuntu-latest
if: contains(github.event.pull_request.labels.*.name, 'build')
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 1
- run: npm install
- run: node ./node_modules/eslint/bin/eslint src/** --no-error-on-unmatched-pattern
- run: npm run test
- run: npm install -g vsce
- name: Create build
run: npm run package
- name: Upload build
uses: actions/upload-artifact@v2
with:
name: code-for-ibmi-pr-build
path: ./*.vsix
- name: Post comment
uses: actions/github-script@v5
with:
script: |
github.rest.issues.createComment({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
body: '👋 A new build is available for this PR based on ${{ github.event.pull_request.head.sha }}.\n * [Download here.](https://github.com/halcyon-tech/vscode-rpgle/actions/runs/${{ github.run_id }})\n* [Read more about how to test](https://github.com/halcyon-tech/vscode-rpgle/blob/master/.github/pr_testing_template.md)'
})