-
Notifications
You must be signed in to change notification settings - Fork 2
47 lines (39 loc) · 1.05 KB
/
Copy pathbuild_gem.yml
File metadata and controls
47 lines (39 loc) · 1.05 KB
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
name: Build gem
on:
push:
tags:
- 'v*'
workflow_dispatch:
inputs:
release_tag:
description: "Release tag"
required: true
permissions:
contents: write
jobs:
build-gem:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
bundler-cache: true
ruby-version: ruby
- name: Get tag
id: get-tag
run: echo "SOURCE_TAG=${GITHUB_REF#refs/tags/}" >> $GITHUB_ENV
- name: Install dependencies
run: bundle install
- name: Build gem
run: gem build project_pull_mover.gemspec -o project_pull_mover-${SOURCE_TAG}.gem
env:
SOURCE_TAG: ${{ env.SOURCE_TAG }}
- name: Create release
uses: softprops/action-gh-release@v2
with:
files: project_pull_mover-${SOURCE_TAG}.gem
tag_name: ${{ github.event.inputs.release_tag }}
token: ${{ secrets.GITHUB_TOKEN }}
env:
SOURCE_TAG: ${{ env.SOURCE_TAG }}