mirror of
https://github.com/matrix-org/matrix-rust-sdk.git
synced 2026-05-05 06:28:20 -04:00
57 lines
1.5 KiB
YAML
57 lines
1.5 KiB
YAML
# This workflow releases the `matrix-sdk-crypto-js` project.
|
|
#
|
|
# It is triggered when a new tag appears that matches
|
|
# `matrix-sdk-crypto-js-[0-9]+.*`. This workflow builds the package
|
|
# for the bindings, runs its tests to ensure everything is still
|
|
# correct, and publishes the package on NPM and on a newly created
|
|
# Github release.
|
|
|
|
|
|
name: Release `crypto-js`
|
|
|
|
env:
|
|
CARGO_TERM_COLOR: always
|
|
PKG_PATH: "bindings/matrix-sdk-crypto-js"
|
|
|
|
on:
|
|
push:
|
|
tags:
|
|
- matrix-sdk-crypto-js-[0-9]+.*
|
|
|
|
jobs:
|
|
publish-matrix-sdk-crypto-js:
|
|
name: Publish 🕸 [m]-crypto-js
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- name: Checkout the repo
|
|
uses: actions/checkout@v3
|
|
|
|
- name: Install Rust
|
|
uses: dtolnay/rust-toolchain@stable
|
|
with:
|
|
targets: wasm32-unknown-unknown
|
|
|
|
- name: Install Node.js
|
|
uses: actions/setup-node@v3
|
|
with:
|
|
node-version: 20.0
|
|
|
|
- name: Install NPM dependencies
|
|
working-directory: ${{ env.PKG_PATH }}
|
|
run: npm install
|
|
|
|
- name: Publish the WebAssembly + JavaScript binding (imply building + testing)
|
|
uses: JS-DevTools/npm-publish@v1
|
|
with:
|
|
package: ${{env.PKG_PATH}}/package.json
|
|
access: public
|
|
token: ${{ secrets.NPM_TOKEN }}
|
|
|
|
- name: Create the Github release
|
|
uses: softprops/action-gh-release@v1
|
|
with:
|
|
draft: true
|
|
files: ${{ env.PKG_PATH }}/pkg/matrix-org-matrix-sdk-crypto-js-*.tgz
|