Skip to content

Commit 64811d5

Browse files
feat: prepare initial publication of cli (#1752)
* feat: prepare initial publication of cli * build: try to fix build * test: try to make node4 ci work * test: run all ci tasks at once * fix: bring package.json @types/node back Co-authored-by: Alexander Fenster <[email protected]>
1 parent 2cdbba3 commit 64811d5

18 files changed

+457
-388
lines changed

.github/workflows/release-cli.yaml

+42
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
on:
2+
push:
3+
branches:
4+
- master
5+
name: release-please
6+
jobs:
7+
release-please-pr:
8+
runs-on: ubuntu-latest
9+
steps:
10+
- id: release-pr
11+
uses: google-github-actions/release-please-action@v3
12+
with:
13+
token: ${{ secrets.GITHUB_TOKEN }}
14+
release-type: node
15+
package-name: protobufjs-cli
16+
command: release-pr
17+
path: cli
18+
release-please-release:
19+
runs-on: ubuntu-latest
20+
steps:
21+
- uses: google-github-actions/release-please-action@v3
22+
id: tag-release
23+
with:
24+
token: ${{ secrets.GITHUB_TOKEN }}
25+
release-type: node
26+
package-name: protobufjs-cli
27+
command: github-release
28+
path: cli
29+
- uses: actions/checkout@v2
30+
if: ${{ steps.tag-release.outputs.release_created }}
31+
- uses: actions/setup-node@v1
32+
if: ${{ steps.tag-release.outputs.release_created }}
33+
with:
34+
node-version: 14
35+
registry-url: 'https://wombat-dressing-room.appspot.com/'
36+
- name: publish
37+
if: ${{ steps.tag-release.outputs.release_created }}
38+
env:
39+
NODE_AUTH_TOKEN: ${{secrets.NPM_CLI_TOKEN}}
40+
run: |
41+
npm install
42+
npm publish

.github/workflows/test.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ jobs:
2121
run: npm run lint:types
2222
build:
2323
runs-on: ubuntu-latest
24-
needs: lint
2524
steps:
2625
- uses: actions/checkout@v1
2726
- uses: actions/setup-node@v1
@@ -33,7 +32,6 @@ jobs:
3332
run: npm run build
3433
test:
3534
runs-on: ubuntu-latest
36-
needs: build
3735
strategy:
3836
matrix:
3937
node_version: ["4", "4.3.2", "6", "8", "10", "12"]
@@ -42,6 +40,9 @@ jobs:
4240
- uses: actions/setup-node@v1
4341
with:
4442
node-version: ${{ matrix.node_version }}
43+
- name: 'Install the latest @types/node that works'
44+
if: ${{ matrix.node_version == '4' || matrix.node_version == '4.3.2' || matrix.node_version == '6' }}
45+
run: npm install --save --save-exact @types/[email protected]
4546
- name: "Install dependencies"
4647
run: npm install
4748
- name: "Test sources"
@@ -50,7 +51,6 @@ jobs:
5051
run: npm run test:types
5152
bench:
5253
runs-on: ubuntu-latest
53-
needs: build
5454
steps:
5555
- uses: actions/checkout@v1
5656
- uses: actions/setup-node@v1

0 commit comments

Comments
 (0)