Sha256: fccd1bc79d7fa43f5d055e07c22217f7ee07381c1ba22af7afdb0ddc44f7368d

Contents?: true

Size: 1.52 KB

Versions: 5

Compression:

Stored size: 1.52 KB

Contents

name: Release Gem

on:
  push:
    tags: ['v[0-9]*']

jobs:
  release:
    runs-on: macos-latest

    steps:
      - name: ruby 3.2
        uses: ruby/setup-ruby@v1
        with:
          ruby-version: 3.2

      - name: checkout
        uses: actions/checkout@v2

      - name: setup dependencies
        run: "ruby -I.github/workflows -rutils -e 'setup_dependencies'"

      - name: test
        run: rake test

      - name: create gem
        id: gem
        run: |
          rake gem
          echo path=$(ruby -e 'print Dir.glob("*.gem").first') >> $GITHUB_OUTPUT

      - name: create github release
        id: release
        uses: actions/create-release@v1
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
        with:
          tag_name: ${{ github.ref }}
          release_name: ${{ github.ref }}

      - name: upload to github release
        uses: actions/upload-release-asset@v1
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
        with:
          upload_url: ${{ steps.release.outputs.upload_url }}
          asset_path: ./${{ steps.gem.outputs.path }}
          asset_name:   ${{ steps.gem.outputs.path }}
          asset_content_type: application/zip

      - name: upload to rubygems
        env:
          GEM_HOST_API_KEY: ${{ secrets.RUBYGEMS_AUTH_TOKEN }}
        run: |
          mkdir -p $HOME/.gem
          touch $HOME/.gem/credentials
          chmod 0600 $HOME/.gem/credentials
          printf -- "---\n:rubygems_api_key: ${GEM_HOST_API_KEY}\n" > $HOME/.gem/credentials
          rake upload

Version data entries

5 entries across 5 versions & 5 rubygems

Version Path
reflexion-0.1.32 .github/workflows/release-gem.yml
rays-0.1.32 .github/workflows/release-gem.yml
beeps-0.1.32 .github/workflows/release-gem.yml
rucy-0.1.32 .github/workflows/release-gem.yml
xot-0.1.32 .github/workflows/release-gem.yml