Skip to content

Commit 0393e2b

Browse files
author
william-brooks
authored
Merge pull request #356 from identity-com/feature/gateway_v2
Merge GatewayV2 into develop
2 parents 0924728 + 77c7d06 commit 0393e2b

File tree

155 files changed

+22742
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

155 files changed

+22742
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
# This Github Action is designed to automatically publish Crate packages.
2+
#
3+
# While this Github Action will often be triggered, it will only publish a new package
4+
# if the version specified in the cargo.toml file(s) is behind that already published.
5+
#
6+
# Further documentation on how this webhook works can be found at the following URL:
7+
# https://github.com/marketplace/actions/publish-crates
8+
9+
name: "Crates Auto Publish Workflow"
10+
11+
on:
12+
workflow_call:
13+
inputs:
14+
environment:
15+
description: |
16+
Choose from which environment to run this workflow
17+
required: true
18+
type: string
19+
package-path:
20+
description: |
21+
Provide the path to your package.json file
22+
required: true
23+
type: string
24+
secrets:
25+
publish-token:
26+
required: true
27+
28+
jobs:
29+
build:
30+
runs-on: ubuntu-latest
31+
steps:
32+
- uses: actions/checkout@v3
33+
- name: Build
34+
run: cargo build --verbose
35+
- name: Run tests
36+
run: cargo test --verbose
37+
38+
publish-cargo:
39+
needs: build
40+
runs-on: ubuntu-latest
41+
environment: ${{ inputs.environment }}
42+
steps:
43+
- uses: actions/checkout@v3
44+
- name: publish package
45+
uses: katyo/publish-crates@v1
46+
with:
47+
path: ${{ inputs.package-path }}
48+
registry-token: ${{ secrets.publish-token }}
49+
ignore-unpublished-changes: true
+22
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
name: "Cargo Crates Auto Publish"
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
- develop
8+
paths:
9+
- "solana/program_v2/programs/gateway_v2/Cargo.toml"
10+
11+
env:
12+
CARGO_TERM_COLOR: always
13+
14+
jobs:
15+
16+
publish-gateway:
17+
uses: "./.github/workflows/crates-auto-publish-workflow.yml"
18+
with:
19+
environment: "crates-auto-publish"
20+
package-path: "solana/program_v2/programs/gateway_v2/Cargo.toml"
21+
secrets:
22+
publish-token: ${{ secrets.CARGO_TOKEN }}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
# This Github Action is designed to automatically publish NPM packages.
2+
#
3+
# While this Github Action will often be triggered, it will only publish a new package
4+
# if the version specified in the package.json file(s) is behind that already published.
5+
#
6+
# Further documentation on how this webhook works can be found at the following URL:
7+
# https://github.com/marketplace/actions/npm-publish
8+
9+
name: "NPM Auto Publish Workflow"
10+
11+
on:
12+
workflow_call:
13+
inputs:
14+
environment:
15+
description: |
16+
Choose from which environment to run this workflow
17+
required: true
18+
type: string
19+
production-branch:
20+
description: |
21+
Changes pushed to this branch will always be tagged with a "latest" tag
22+
Any other branch will default to receiving an "alpha" tag.
23+
required: true
24+
type: string
25+
package-path:
26+
description: |
27+
Provide the path to your package.json file
28+
required: true
29+
type: string
30+
secrets:
31+
publish-token:
32+
required: true
33+
34+
jobs:
35+
publish-npm:
36+
environment: ${{ inputs.environment }}
37+
runs-on: ubuntu-latest
38+
steps:
39+
- uses: actions/checkout@v3
40+
- uses: actions/setup-node@v3
41+
with:
42+
node-version: 16
43+
registry-url: https://registry.npmjs.org/
44+
45+
- name: Extract Tag Value
46+
id: extract-tag-value
47+
shell: bash
48+
run: |
49+
if [ "${GITHUB_REF##*/}" == "${{ inputs.production-branch }}" ]; then
50+
echo "Using 'Latest' Tag"
51+
echo "tag-value=latest" >> $GITHUB_OUTPUT
52+
else
53+
echo "Using 'Alpha' Tag"
54+
echo "tag-value=alpha" >> $GITHUB_OUTPUT
55+
fi
56+
57+
- name: NPM Publish Package
58+
uses: JS-DevTools/npm-publish@v1
59+
with:
60+
token: ${{ secrets.publish-token }}
61+
package: ${{ inputs.package-path }}
62+
check-version: true
63+
tag: ${{ steps.extract-tag-value.outputs.tag-value }}
+39
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
name: "NPM Auto Publish"
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
- develop
8+
paths:
9+
- "solana/program_v2/packages/client/cli/package.json"
10+
- "solana/program_v2/packages/client/core/package.json"
11+
- "solana/program_v2/packages/client/idl/package.json"
12+
13+
jobs:
14+
publish-gateway-solana-cli:
15+
uses: "./.github/workflows/npm-auto-publish-workflow.yml"
16+
with:
17+
environment: "npm-auto-publish"
18+
production-branch: 'main'
19+
package-path: "solana/program_v2/packages/client/cli/package.json"
20+
secrets:
21+
publish-token: ${{ secrets.NPM_TOKEN }}
22+
23+
publish-gateway-solana-client:
24+
uses: "./.github/workflows/npm-auto-publish-workflow.yml"
25+
with:
26+
environment: "npm-auto-publish"
27+
production-branch: 'main'
28+
package-path: "solana/program_v2/packages/client/core/package.json"
29+
secrets:
30+
publish-token: ${{ secrets.NPM_TOKEN }}
31+
32+
publish-gateway-solana-idl:
33+
uses: "./.github/workflows/npm-auto-publish-workflow.yml"
34+
with:
35+
environment: "npm-auto-publish"
36+
production-branch: 'main'
37+
package-path: "solana/program_v2/packages/client/idl/package.json"
38+
secrets:
39+
publish-token: ${{ secrets.NPM_TOKEN }}

0 commit comments

Comments
 (0)