Merge pull request #379 from bastelfreak/rel330 #34
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Release | |
on: | |
push: | |
tags: | |
- '*' | |
jobs: | |
release: | |
runs-on: ubuntu-latest | |
if: github.repository == 'voxpupuli/facterdb' | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install Ruby 3.3 | |
uses: ruby/setup-ruby@v1 | |
with: | |
ruby-version: '3.3' | |
bundler-cache: true | |
env: | |
BUNDLE_WITHOUT: release | |
- name: Generate database | |
run: bundle exec rake database | |
- name: Build gem | |
run: gem build --strict --verbose *.gemspec | |
- name: Publish gem to rubygems.org | |
run: gem push *.gem | |
env: | |
GEM_HOST_API_KEY: '${{ secrets.RUBYGEMS_AUTH_TOKEN }}' | |
- name: Setup GitHub packages access | |
run: | | |
mkdir -p ~/.gem | |
echo ":github: Bearer ${{ secrets.GITHUB_TOKEN }}" >> ~/.gem/credentials | |
chmod 0600 ~/.gem/credentials | |
- name: Publish gem to GitHub packages | |
run: gem push --key github --host https://rubygems.pkg.github.com/voxpupuli *.gem |