-
Notifications
You must be signed in to change notification settings - Fork 101
52 lines (50 loc) · 1.39 KB
/
gem.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
name: Release gem
on:
workflow_dispatch:
inputs:
rubygems-otp-code:
description: RubyGems OTP code
required: true
type: string
jobs:
release:
runs-on: ubuntu-latest
strategy:
matrix:
node-version:
- 20
ruby-version:
- 3.3
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby-version }}
bundler: latest
bundler-cache: true
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: npm
cache-dependency-path: frontend/package-lock.json
- name: Buld frontend
run: |
npm install
npm run build
working-directory: frontend
- name: Copy forntend assets
run: |
mkdir -p lib/mihari/web/public/
cp -r frontend/dist/* lib/mihari/web/public
- name: Configure Git
run: |
git config --global user.name "${GITHUB_ACTOR}"
git config --global user.email "${GITHUB_ACTOR}@users.noreply.github.com"
- name: Release gem
run: bundle exec rake release
env:
GEM_HOST_API_KEY: ${{ secrets.GEM_HOST_API_KEY }}
GEM_HOST_OTP_CODE: ${{ inputs.rubygems-otp-code }}