Skip to content

Commit 925c104

Browse files
authored
Add workflow to build gem and store as artifact
Artifact gets deleted after 15 days
1 parent bba2728 commit 925c104

File tree

1 file changed

+38
-0
lines changed

1 file changed

+38
-0
lines changed

gem_artifact.yml

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
name: Build Gem Artifact
2+
3+
on:
4+
workflow_dispatch:
5+
6+
jobs:
7+
build_gem:
8+
name: Build Gem Artifact
9+
runs-on: "ubuntu-latest"
10+
strategy:
11+
fail-fast: true
12+
steps:
13+
- name: Checkout Repository
14+
uses: actions/checkout@v2
15+
- name: "Set up Ruby 2.7"
16+
uses: ruby/setup-ruby@v1
17+
with:
18+
ruby-version: "2.7"
19+
bundler-cache: true
20+
- name: "Set up Node 12"
21+
uses: actions/setup-node@v2
22+
with:
23+
node-version: "12"
24+
cache: yarn
25+
- name: Install Frontend Dependencies
26+
run: yarn install
27+
- name: Test Backend
28+
run: bundle exec rspec
29+
- name: Test and Build Frontend
30+
run: bash script/build
31+
- name: Build Gem
32+
run: gem build jekyll-admin.gemspec
33+
- name: Stash Gem as Temporary Artifact
34+
uses: actions/upload-artifact@v2
35+
with:
36+
name: "jekyll-admin.gem"
37+
path: "${{ github.workspace }}/*.gem"
38+
retention-days: 15

0 commit comments

Comments
 (0)