Skip to content

1.12.1

1.12.1 #20

Workflow file for this run

---
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') }}