Update build step for CI

This commit is contained in:
Gabriel Arazas 2023-10-28 18:19:01 +08:00
parent fcb06be49f
commit 2495c6a0ac
No known key found for this signature in database
GPG Key ID: ADE0C41DAB221FCC

View File

@ -1,24 +1,20 @@
name: Publish gem name: Publish gem
on: on:
push: push:
branches:
- master
tags: tags:
- v* - v*
jobs: jobs:
build: build:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v4
- uses: cachix/install-nix-action@v22 - uses: DeterminateSystems/magic-nix-action@v2
- uses: DeterminateSystems/nix-installer-actions@v5
with: with:
github_access_token: ${{ secrets.GITHUB_TOKEN }} github_access_token: ${{ secrets.GITHUB_TOKEN }}
- name: Enter Nix devenv
run: nix develop
- name: Release Gem - name: Release Gem
if: contains(github.ref, 'refs/tags/v')
uses: cadwallion/publish-rubygems-action@master uses: cadwallion/publish-rubygems-action@master
env: env:
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
RUBYGEMS_API_KEY: ${{secrets.RUBYGEMS_API_KEY}} RUBYGEMS_API_KEY: ${{secrets.RUBYGEMS_API_KEY}}
RELEASE_COMMAND: rake release RELEASE_COMMAND: nix develop -c rake release