Sha256: f5eaa13be7d2bc8e6cee0a098518df5308958b118c7138d5faec25e6f0fd438c

Contents?: true

Size: 1.01 KB

Versions: 2

Compression:

Stored size: 1.01 KB

Contents

name: Publish Gem

on:
  push:
    branches:
      - main
      - master
jobs:
  publish:
    runs-on: ubuntu-latest
    permissions:
      contents: write

    steps:
      - uses: actions/checkout@v3

      - name: Setup Ruby and install gems
        uses: ruby/setup-ruby@v1
        with:
          bundler-cache: true
          ruby-version: 2.7
          rubygems: latest

      - name: Release Gem
        run: |
          VERSION=$(bundle exec rake version)
          GEM_VERSION=$(gem list --exact --remote $GEM_NAME)

          # Publish to RubyGems.org
          if [ "${GEM_VERSION}" != "$GEM_NAME (${VERSION})" ]; then
            gem build $GEM_NAME.gemspec
            gem push "$GEM_NAME-${VERSION}.gem"
          fi

          # Create a release tag
          if ! git ls-remote --tags --exit-code origin v${VERSION}; then
            git tag v${VERSION}
            git push --tags
          fi
        env:
          GEM_HOST_API_KEY: "${{ secrets.RUBYGEMS_AUTH_TOKEN }}"
          GEM_NAME: archivesspace-client

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
archivesspace-client-0.3.0 .github/workflows/publish.yml
archivesspace-client-0.2.0 .github/workflows/publish.yml