Skip to content

Commit

Permalink
Merge pull request #203 from oasisprotocol/CU-863h6mt6x_Use-CI-to-pub…
Browse files Browse the repository at this point in the history
…lish-NPM-packages-on-sapphire-paratime-repo_Xi-Zhang

Add publish workflow
  • Loading branch information
aefhm authored Oct 17, 2023
2 parents 5e712c1 + 935c121 commit a0cf719
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 3 deletions.
26 changes: 26 additions & 0 deletions .github/workflows/publish.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: publish

on:
push:
tags:
- clients/js/v[0-9].[0-9]+.[0-9]+
- contracts/v[0-9].[0-9]+.[0-9]+
- integrations/hardhat/v[0-9].[0-9]+.[0-9]+

jobs:
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: "18"
- name: Extract package from tag
id: extract-tag
run: |
echo "NPM_PACKAGE=$(echo ${{ github.ref_name }} | grep -oE '(clients/js|contracts|integrations/hardhat)')" >> $GITHUB_OUTPUT
- name: Publish ${{ github.ref_name }} to NPM
uses: JS-DevTools/npm-publish@v2
with:
token: ${{ secrets.NPM_TOKEN }}
package: ${{ steps.extract-tag.outputs.NPM_PACKAGE }}
4 changes: 2 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,9 +65,9 @@ if the issue is not reported yet, [file a new one].

## Development

### Building and Testing
### Building

Building and testing are documented in our
Building documentation lies at the top-level
[README](https://github.com/oasisprotocol/sapphire-paratime/blob/main/README.md).

### Contributing Code
Expand Down
11 changes: 10 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,15 @@ development environments
- [`runtime`](./runtime/): the Sapphire Paratime as based off of the
[Oasis SDK](https://github.com/oasisprotocol/oasis-sdk)

## Release

### Clients

JS libraries should be updated with a version bump in the `package.json`
file and a respective tag in the pattern of `{{path}}/v{{semver}}`, such as
`clients/js/v1.1.1`.


## Contributing

Developers are encouraged to contribute their improvements to the Sapphire
Expand All @@ -47,4 +56,4 @@ See our [Contributing Guidelines](CONTRIBUTING.md).
Oasis remains committed to unlocking the full potential of privacy applications
on Web3.

Join the [Privacy4Web3 Hackathon](https://oasisprotocol.org/p4w3-hackathon) today!
Build with [us](https://oasisprotocol.org/opl#how-to-get-started) today!

0 comments on commit a0cf719

Please sign in to comment.