Repository navigation
56 lines (53 loc) · 1.67 KB
/
Copy pathplugin-dc-postgres.yml
File metadata and controls
56 lines (53 loc) · 1.67 KB
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
52
53
54
55
56
# The name of the plugin to appear in the actions and badge!
name: PostgreSQL DataConnector Release
on:
release:
types:
- published
tags:
# If this tag is pushed, a release is created
- '*plugin-dc-postgres*'
jobs:
publish-gpr:
# This is a required check, as the on:release can't be filtered on given tags
if: contains(github.ref, 'plugin-dc-postgres')
env:
# This must be aligned with the folder-name of you plugin
workingDirectory: 'api-builder-plugin-dc-postgres'
CI: true
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: actions/setup-node@v1
with:
node-version: 12
registry-url: https://npm.pkg.github.com/
scope: '@Axway-API-Builder-Ext'
- name: Publish to GitHub package repo
working-directory: ${{env.workingDirectory}}
env:
NODE_AUTH_TOKEN: ${{secrets.GITHUB_TOKEN}}
run: |
npm install
npm publish
publish-npm:
env:
# This must be aligned with the folder-name of you plugin
workingDirectory: 'api-builder-plugin-dc-postgres'
CI: true
needs: [publish-gpr]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: actions/setup-node@v1
with:
node-version: 12
registry-url: https://registry.npmjs.org/
- name: Publish to NPM package repo
working-directory: ${{env.workingDirectory}}
env:
NODE_AUTH_TOKEN: ${{secrets.npm_token}}
run: |
npm install
echo "//registry.npmjs.org/:_authToken=${{ secrets.npm_token }}" > ~/.npmrc
npm publish --access public