Skip to content

Publish v3.1.0

Publish v3.1.0 #35

Workflow file for this run

---
name: Publish
run-name: Publish ${{ github.ref_name }}
on:
push:
tags:
- v*
jobs:
build:
name: Build
uses: ./.github/workflows/_build.yml
release:
name: GitHub Releases
runs-on: ubuntu-latest
timeout-minutes: 30
needs: build
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Download artifact
uses: actions/download-artifact@v4
with:
name: ${{ needs.build.outputs.artifact_name }}
path: pkg/
- name: Generate release notes
id: changelog
run: |
mkdir tmp
outfile=tmp/changelog.txt
echo "outfile=${outfile}" >> $GITHUB_OUTPUT
npx standard-changelog@^5.0.0 --release-count 2 --infile $outfile.tmp --outfile $outfile.tmp
sed '1,3d' $outfile.tmp > $outfile
- name: Create GitHub release
uses: softprops/action-gh-release@v2
with:
token: ${{ secrets.GH_TOKEN }}
fail_on_unmatched_files: true
prerelease: ${{ contains(github.ref_name, 'pre') }}
files: pkg/*
body_path: ${{ github.workspace }}/${{ steps.changelog.outputs.outfile }}
rubygems:
name: RubyGems.org
uses: ./.github/workflows/_publish.yml
needs: build
with:
artifact_name: ${{ needs.build.outputs.artifact_name }}
registry_key: rubygems
registry_host: https://rubygems.org
secrets:
registry_credentials: ${{ secrets.RUBYGEMS_API_KEY }}
github:
name: GitHub Packages
uses: ./.github/workflows/_publish.yml
permissions:
packages: write
needs: build
with:
artifact_name: ${{ needs.build.outputs.artifact_name }}
registry_key: github
registry_host: https://rubygems.pkg.github.com/${{ github.repository_owner }}
secrets:
registry_credentials: Bearer ${{ secrets.GITHUB_TOKEN }}