Skip to content

Commit 7f1de65

Browse files
author
Chris Wiechmann
committed
Created an action to release the Postgres connector
1 parent 3fd4441 commit 7f1de65

File tree

1 file changed

+55
-0
lines changed

1 file changed

+55
-0
lines changed
Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
# The name of the plugin to appear in the actions and badge!
2+
name: PostgreSQL DataConnector Release
3+
4+
on:
5+
release:
6+
types:
7+
- published
8+
tags:
9+
# If this tag is pushed, a release is created
10+
- '*plugin-dc-postgres*'
11+
12+
jobs:
13+
publish-gpr:
14+
env:
15+
# This must be aligned with the folder-name of you plugin
16+
workingDirectory: 'api-builder-plugin-dc-postgres'
17+
CI: true
18+
needs: build
19+
runs-on: ubuntu-latest
20+
steps:
21+
- uses: actions/checkout@v1
22+
- uses: actions/setup-node@v1
23+
with:
24+
node-version: 12
25+
registry-url: https://npm.pkg.github.com/
26+
scope: '@Axway-API-Builder-Ext'
27+
- name: Publish to GitHub package repo
28+
working-directory: ${{env.workingDirectory}}
29+
env:
30+
NODE_AUTH_TOKEN: ${{secrets.GITHUB_TOKEN}}
31+
run: |
32+
npm ci
33+
npm publish
34+
35+
publish-npm:
36+
env:
37+
# This must be aligned with the folder-name of you plugin
38+
workingDirectory: 'api-builder-plugin-dc-postgres'
39+
CI: true
40+
needs: [build, publish-gpr]
41+
runs-on: ubuntu-latest
42+
steps:
43+
- uses: actions/checkout@v1
44+
- uses: actions/setup-node@v1
45+
with:
46+
node-version: 12
47+
registry-url: https://registry.npmjs.org/
48+
- name: Publish to NPM package repo
49+
working-directory: ${{env.workingDirectory}}
50+
env:
51+
NODE_AUTH_TOKEN: ${{secrets.npm_token}}
52+
run: |
53+
npm ci
54+
echo "//registry.npmjs.org/:_authToken=${{ secrets.npm_token }}" > ~/.npmrc
55+
npm publish --access public

0 commit comments

Comments
 (0)