This repository was archived by the owner on Jan 14, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 5
79 lines (77 loc) · 2.22 KB
/
publish.yml
File metadata and controls
79 lines (77 loc) · 2.22 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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
---
name: publish
on:
push:
tags:
- v*
jobs:
rubygems:
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup
uses: ./.github/actions/setup
- name: Setup credentials
run: |
mkdir -p ~/.gem
echo ":rubygems: $TOKEN" > ~/.gem/credentials
chmod 600 ~/.gem/credentials
env:
TOKEN: ${{ secrets.RUBYGEMS_API_KEY }}
- name: Publish
run: bundle exec gem release
env:
GEM_RELEASE_KEY: rubygems
GEM_RELEASE_HOST: https://rubygems.org
github:
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup
uses: ./.github/actions/setup
- name: Setup credentials
run: |
mkdir -p ~/.gem
echo ":github: Bearer $TOKEN" > ~/.gem/credentials
chmod 600 ~/.gem/credentials
env:
TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Publish
run: bundle exec gem release
env:
GEM_RELEASE_KEY: github
GEM_RELEASE_HOST: https://rubygems.pkg.github.com/${{ github.repository_owner }}
release:
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Setup
uses: ./.github/actions/setup
- name: Build
run: bundle exec rake build
- name: Setup Node.js
uses: actions/setup-node@v3
- name: Generate release notes
id: changelog
run: |
mkdir tmp
outfile=tmp/changelog.txt
echo "outfile=${outfile}" >> $GITHUB_OUTPUT
npx standard-changelog@^2.0.0 --release-count 2 --infile $outfile.tmp --outfile $outfile.tmp
sed '1,7d' $outfile.tmp > $outfile
- name: Create GitHub release
uses: softprops/action-gh-release@v1
with:
token: ${{ secrets.GH_TOKEN }}
body_path: ${{ github.workspace }}/${{ steps.changelog.outputs.outfile }}
files: pkg/*
fail_on_unmatched_files: true
prerelease: ${{ contains(github.ref_name, 'pre') }}