File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ name : Publish to crates.io
2+ on :
3+ push :
4+ tags : ['v*'] # Triggers when pushing tags starting with 'v'
5+ jobs :
6+ publish :
7+ if : github.repository == 'ruby/prism'
8+ runs-on : ubuntu-latest
9+ environment : release # Optional: for enhanced security
10+ permissions :
11+ id-token : write # Required for OIDC token exchange
12+ steps :
13+ - name : Harden Runner
14+ uses : step-security/harden-runner@v2
15+ with :
16+ egress-policy : audit
17+ - uses : actions/checkout@v5
18+
19+ - name : Set up Ruby
20+ uses : ruby/setup-ruby@v1
21+ with :
22+ ruby-version : " 3.4"
23+ bundler-cache : true
24+
25+ - uses : rust-lang/crates-io-auth-action@v1
26+ id : auth
27+
28+ - run : bundle exec rake cargo:publish:real
29+ env :
30+ CARGO_REGISTRY_TOKEN : ${{ steps.auth.outputs.token }}
Original file line number Diff line number Diff line change 1+ name : Publish gem to rubygems.org
2+
3+ on :
4+ push :
5+ tags :
6+ - ' v*'
7+
8+ permissions :
9+ contents : read
10+
11+ jobs :
12+ push :
13+ if : github.repository == 'ruby/prism'
14+ runs-on : ubuntu-latest
15+
16+ environment :
17+ name : rubygems.org
18+ url : https://rubygems.org/gems/prism
19+
20+ permissions :
21+ contents : write
22+ id-token : write
23+
24+ steps :
25+ - name : Harden Runner
26+ uses : step-security/harden-runner@v2
27+ with :
28+ egress-policy : audit
29+
30+ - uses : actions/checkout@v4
31+
32+ - name : Set up Ruby
33+ uses : ruby/setup-ruby@v1
34+ with :
35+ ruby-version : " 3.4"
36+ bundler-cache : true
37+
38+ - name : Publish to RubyGems
39+ uses : rubygems/release-gem@v1
Original file line number Diff line number Diff line change 1+ name : Publish to npmjs.com
2+ on :
3+ push :
4+ tags : ['v*'] # Triggers when pushing tags starting with 'v'
5+ jobs :
6+ publish :
7+ if : github.repository == 'ruby/prism'
8+ runs-on : ubuntu-latest
9+ environment : release # Optional: for enhanced security
10+ permissions :
11+ id-token : write # Required for OIDC token exchange
12+ steps :
13+ - name : Harden Runner
14+ uses : step-security/harden-runner@v2
15+ with :
16+ egress-policy : audit
17+ - uses : actions/checkout@v5
18+
19+ - name : Set up Ruby
20+ uses : ruby/setup-ruby@v1
21+ with :
22+ ruby-version : " 3.4"
23+ bundler-cache : true
24+
25+ - name : Set up node
26+ uses : actions/setup-node@v4
27+ with :
28+ node-version : ' 20'
29+ registry-url : ' https://registry.npmjs.org'
30+
31+ - name : rake templates
32+ run : bundle exec rake templates
33+
34+ - name : Set up WASI-SDK
35+ run : |
36+ wget https://github.com/WebAssembly/wasi-sdk/releases/download/wasi-sdk-25/wasi-sdk-25.0-x86_64-linux.tar.gz
37+ tar xvf wasi-sdk-25.0-x86_64-linux.tar.gz
38+
39+ - name : Build the project
40+ run : make wasm WASI_SDK_PATH=$(pwd)/wasi-sdk-25.0-x86_64-linux
41+
42+ - name : Update npm
43+ run : npm install -g npm@latest
44+
45+ - run : npm publish
You can’t perform that action at this time.
0 commit comments