-
Notifications
You must be signed in to change notification settings - Fork 2
feat: add a publish.yml for publishing packages to npmjs
#10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,63 @@ | ||
| name: Publish @wasm-miniscript | ||
| on: | ||
| workflow_dispatch: | ||
| push: | ||
| branches: | ||
| - master | ||
|
|
||
| concurrency: | ||
| group: ${{ github.workflow }}-${{ github.ref }} | ||
|
|
||
| jobs: | ||
| publish: | ||
| name: Publish Release | ||
| runs-on: ubuntu-latest | ||
|
|
||
| steps: | ||
| - name: Checkout repository | ||
| uses: actions/checkout@v3 | ||
|
|
||
| - name: Setup Node | ||
| uses: actions/setup-node@v3 | ||
| with: | ||
| node-version: 18 | ||
|
|
||
| - name: Install Rust | ||
| uses: actions-rs/toolchain@v1 | ||
| with: | ||
| toolchain: nightly | ||
| profile: minimal | ||
| override: true | ||
|
|
||
| - name: Install wasm-pack | ||
| run: | | ||
| cargo install wasm-pack | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @rushilbg Ideally this dependency would be in a |
||
|
|
||
| - name: Build Info | ||
| run: | | ||
| echo "node $(node --version)" | ||
| echo "npm $(npm --version)" | ||
| echo "yarn $(yarn --version)" | ||
| echo "rust $(rustup --version)" | ||
| git --version | ||
|
|
||
| - name: Configure Git & NPM | ||
| run: | | ||
| git config --global user.name 'Git bot' | ||
| git config --global user.email 'bot@noreply.github.com' | ||
| git remote set-url origin https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/${{ github.repository }} | ||
| git checkout -b release-$(git rev-parse --short HEAD) | ||
| echo "email=${{ secrets.NPM_EMAIL }}" > .npmrc | ||
| echo "@bitgo:registry=https://registry.npmjs.org" >> .npmrc | ||
| echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}" >> .npmrc | ||
| echo "//registry.npmjs.org/:always-auth=true" >> .npmrc | ||
|
|
||
| - name: Install Packages | ||
| run: yarn install --with-frozen-lockfile | ||
|
|
||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Need to add a prepare-release step here that increments the versions.
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Not needed, lerna publish should handle it automatically, updating that command below to add couple more things. |
||
| - name: build packages | ||
| run: yarn lerna run build | ||
|
|
||
| - name: Lerna Publish | ||
| run: yarn lerna publish --force-publish --sign-git-tag --sign-git-commit --include-merged-tags --conventional-commits --yes --loglevel silly | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
v4of this action is available now