Skip to content

Commit 49cc5a5

Browse files
committed
.
1 parent 33de642 commit 49cc5a5

File tree

2 files changed

+13
-15
lines changed

2 files changed

+13
-15
lines changed

.github/workflows/build.yml

Lines changed: 9 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,5 @@
11
name: "Build"
2-
on:
3-
push:
4-
paths-ignore:
5-
- 'dist/**'
2+
on: push
63
jobs:
74
test_ros:
85
name: Build
@@ -12,26 +9,24 @@ jobs:
129
- uses: actions/setup-node@v1
1310
with:
1411
node-version: '12.x'
15-
- run: npm ci
1612
- run: rm dist/index.js
17-
- run: npm run build
13+
- run: |
14+
npm ci
15+
npm run build
1816
- name: Check if there are changes
1917
id: changes
2018
run: |
21-
if [[ `git status --porcelain --ignored` ]]; then
19+
git add --force dist/index.js
20+
if [[ `git diff --staged` ]]; then
2221
echo ::set-output name=changed::1
2322
else
2423
echo ::set-output name=changed::0
2524
fi
2625
- if: steps.changes.outputs.changed == 1
2726
run: |
2827
git config user.email "ros-tooling@users.noreply.github.com"
29-
git config user.name "ros-tooling[bot]"
30-
git add --force dist
31-
git commit -m "$commitmsg" --no-verify
28+
git config user.name "ROS Tooling [bot]"
29+
git commit --no-verify -m "$commitmsg" -s
3230
git push --no-verify
3331
env:
34-
commitmsg: |
35-
Autobuild
36-
37-
GitHub-Workflow: ${{ github.workflow }}
32+
commitmsg: "Autobuild\\n\\nGitHub-Workflow: ${{ github.workflow }}"

.gitignore

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
11
__tests__/runner/*
2-
/dist/
32
node_modules/
43

4+
# Although we *do* expect dist to get updated, there's no need for the user to commit it.
5+
# We can do that with the github "build" workflow.
6+
/dist/
7+
58
# Rest pulled from https://github.com/github/gitignore/blob/master/Node.gitignore
69
# Logs
710
logs

0 commit comments

Comments
 (0)