Release 1.3.0 #5
Workflow file for this run
This file contains hidden or 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: Gem Release | |
| on: | |
| push: | |
| tags: | |
| - '*' | |
| permissions: {} | |
| jobs: | |
| build-release: | |
| # Prevent releases from forked repositories | |
| if: github.repository_owner == 'OpenVoxProject' | |
| name: Build the gem | |
| runs-on: ubuntu-24.04 | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Install Ruby | |
| uses: ruby/setup-ruby@v1 | |
| with: | |
| ruby-version: 'ruby' | |
| - name: Build gem | |
| shell: bash | |
| run: gem build --verbose *.gemspec | |
| - name: Upload gem to GitHub cache | |
| uses: actions/upload-artifact@v6 | |
| with: | |
| name: gem-artifact | |
| path: '*.gem' | |
| retention-days: 1 | |
| compression-level: 0 | |
| create-github-release: | |
| needs: build-release | |
| name: Create GitHub release | |
| runs-on: ubuntu-24.04 | |
| permissions: | |
| contents: write # clone repo and create release | |
| steps: | |
| - name: Download gem from GitHub cache | |
| uses: actions/download-artifact@v7 | |
| with: | |
| name: gem-artifact | |
| - name: Create Release | |
| shell: bash | |
| env: | |
| GH_TOKEN: ${{ github.token }} | |
| run: gh release create --repo ${{ github.repository }} ${{ github.ref_name }} --generate-notes *.gem | |
| release-to-github: | |
| needs: build-release | |
| name: Release to GitHub | |
| runs-on: ubuntu-24.04 | |
| permissions: | |
| packages: write # publish to rubygems.pkg.github.com | |
| steps: | |
| - name: Download gem from GitHub cache | |
| uses: actions/download-artifact@v7 | |
| with: | |
| name: gem-artifact | |
| - name: Publish gem to GitHub packages | |
| run: gem push --host https://rubygems.pkg.github.com/${{ github.repository_owner }} *.gem | |
| env: | |
| GEM_HOST_API_KEY: ${{ secrets.GITHUB_TOKEN }} |