Skip to content

Commit 2c68434

Browse files
committed
Update workflows to include gem
1 parent cd0cb7c commit 2c68434

2 files changed

Lines changed: 61 additions & 2 deletions

File tree

.github/workflows/publish.yml

Lines changed: 40 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ on:
66
tags:
77
- '*'
88
jobs:
9-
publish:
9+
npm:
1010
runs-on: ubuntu-latest
1111
steps:
1212
- uses: actions/checkout@v5
@@ -18,3 +18,42 @@ jobs:
1818
- run: npm ci
1919
- run: npm run build
2020
- run: npm publish --tag latest
21+
22+
rubygems:
23+
runs-on: ubuntu-latest
24+
defaults:
25+
run:
26+
working-directory: gem
27+
steps:
28+
# Set up
29+
- uses: actions/checkout@v4
30+
- name: Set up Ruby
31+
uses: ruby/setup-ruby@v1
32+
with:
33+
ruby-version: '3.4.7'
34+
- uses: oven-sh/setup-bun@v2
35+
with:
36+
bun-version-file: ".tool-versions"
37+
- uses: actions/setup-node@v6
38+
with:
39+
node-version: '24.x'
40+
registry-url: 'https://registry.npmjs.org'
41+
- run: npm ci
42+
working-directory: .
43+
- run: npm run build
44+
working-directory: .
45+
- run: npm ci
46+
working-directory: entrypoint
47+
- name: Install gems
48+
run: bundle install
49+
- name: Set version
50+
run: sed -i "s/VERSION = '0.0.0'/VERSION = '${GITHUB_REF_NAME#v}'/" lib/triangulum/version.rb && bundle
51+
- name: Package gems
52+
run: bundle exec rake package
53+
54+
# Release
55+
- uses: rubygems/configure-rubygems-credentials@v1.0.0
56+
- name: Publish gem
57+
run: bundle exec rake push:all
58+
- name: Wait for release
59+
run: gem exec rubygems-await pkg/*.gem

.github/workflows/test.yml

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,12 +24,32 @@ jobs:
2424
matrix:
2525
ruby:
2626
- '3.4.7'
27+
defaults:
28+
run:
29+
working-directory: gem
2730

2831
steps:
29-
- uses: actions/checkout@v4
32+
- uses: actions/checkout@v5
3033
- name: Set up Ruby
3134
uses: ruby/setup-ruby@v1
3235
with:
3336
ruby-version: ${{ matrix.ruby }}
37+
- uses: oven-sh/setup-bun@v2
38+
with:
39+
bun-version-file: ".tool-versions"
40+
- uses: actions/setup-node@v6
41+
with:
42+
node-version: '24.x'
43+
registry-url: 'https://registry.npmjs.org'
44+
- run: npm ci
45+
working-directory: .
46+
- run: npm run build
47+
working-directory: .
48+
- run: npm ci
49+
working-directory: entrypoint
50+
- name: Install gems
51+
run: bundle install
3452
- name: Run the default task
3553
run: bundle exec rake
54+
- name: Build all gems
55+
run: bundle exec rake package

0 commit comments

Comments
 (0)