Sha256: 0eaa3f6bc0ed3d0f01b3efee7c3e719559259f5d88312aa7f01bae35c40143ee

Contents?: true

Size: 1.58 KB

Versions: 4

Compression:

Stored size: 1.58 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: install gems
        run: gem install yard

      - 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

4 entries across 4 versions & 2 rubygems

Version Path
rubysketch-0.5.2 .github/workflows/release-gem.yml
processing-0.5.2 .github/workflows/release-gem.yml
rubysketch-0.5.1 .github/workflows/release-gem.yml
processing-0.5.1 .github/workflows/release-gem.yml