Sha256: 1dd80c241f39321360f165ef5176f00e24dd2eedb5fc110ade77c0ad05aec817
Contents?: true
Size: 1.12 KB
Versions: 1
Compression:
Stored size: 1.12 KB
Contents
name: Ruby Gem CI/CD on: push: branches: [ "main" ] pull_request: branches: [ "main" ] jobs: build-and-publish: name: Build and Publish Gem runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 - name: Set up Ruby 3.2.2 uses: ruby/setup-ruby@v1 with: ruby-version: '3.2.2' - name: Install dependencies run: bundle install - name: Build Gem run: gem build *.gemspec - name: Push to RubyGems run: | mkdir -p $HOME/.gem touch $HOME/.gem/credentials chmod 0600 $HOME/.gem/credentials printf -- "---\n:rubygems_api_key: ${RUBYGEMS_AUTH_TOKEN}\n" > $HOME/.gem/credentials gem push *.gem env: RUBYGEMS_AUTH_TOKEN: ${{ secrets.RUBYGEMS_AUTH_TOKEN }} - name: Tag Incremental Version if: github.event_name == 'push' && startsWith(github.ref, 'refs/heads/main') run: | git config --local user.email "action@github.com" git config --local user.name "GitHub Action" git tag -a v$(date +'%Y%m%d%H%M%S') -m "Automated tag from GitHub Actions" git push origin --tags
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
html_scss_class_checker-0.2.0 | .github/workflows/gem-push.yml |