-
Notifications
You must be signed in to change notification settings - Fork 0
49 lines (42 loc) · 1.45 KB
/
manual-release.yml
File metadata and controls
49 lines (42 loc) · 1.45 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
48
49
name: manual-release
on:
workflow_dispatch:
inputs:
api_version:
required: false
description: |
API release version in semver format,
"-preview.x" will be deployed to staging by default,
default equals "gem_version", ex: 1.8.1-preview.1
gem_version:
required: true
description: Gem version that published to "rubygems.org", ex. 1.8.1
env:
GITHUB_PUSH_TOKEN: ${{ secrets.INTERSCRIPT_CI_PAT }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
API_VERSION: ${{github.event.inputs.api_version}}
GEM_VERSION: ${{github.event.inputs.gem_version}}
jobs:
make-release:
runs-on: ubuntu-latest
steps:
- name: clone it
uses: actions/checkout@v2
with:
submodules: true
- name: setup env vars
run: |
API_VERSION="${API_VERSION:-$GEM_VERSION}"
echo "API_VERSION=$API_VERSION" >> ${GITHUB_ENV}
API_TAG_NAME="$API_VERSION"
[[ $API_TAG_NAME != "v"* ]] && API_TAG_NAME="v$API_TAG_NAME"
echo "API_TAG_NAME=$API_TAG_NAME" >> ${GITHUB_ENV}
- name: make new release
uses: softprops/action-gh-release@v0.1.7
with:
token: ${{ env.GITHUB_PUSH_TOKEN }}
tag_name: ${{env.API_TAG_NAME}}
# https://rubygems.org/gems/interscript/versions/2.2.0
body: "#release-by-ci for Interscript Gem v${{env.GEM_VERSION}}"
draft: false
prerelease: false