Sha256: 0e34e00e2c989994105ac878435064dda62eef37891e99d9adc1da35a81fe9a3
Contents?: true
Size: 1.4 KB
Versions: 1
Compression:
Stored size: 1.4 KB
Contents
# https://docs.github.com/ja/actions/automating-builds-and-tests/building-and-testing-ruby#publishing-gems name: Ruby Gem on: push: branches: [ main ] jobs: build: name: Build + Publish runs-on: ubuntu-latest permissions: packages: write contents: read environment: name: production url: https://rubygems.org/gems/vgcal/ steps: - uses: actions/checkout@v3 - uses: ruby/setup-ruby@v1 with: ruby-version: '3.2.2' # Not needed with a .ruby-version file - run: bundle install - name: Publish to RubyGems 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 gem build *.gemspec gem push *.gem env: GEM_HOST_API_KEY: "${{secrets.RUBYGEMS_AUTH_TOKEN}}" create-release: name: Create GitHub release runs-on: ubuntu-latest needs: build permissions: contents: write environment: name: production url: https://rubygems.org/gems/vgcal/ steps: - name: Checkout repo uses: actions/checkout@v3 - run: gh release create $(grep -oP "VERSION = '\K[0-9.]+" lib/vgcal/version.rb) --generate-notes env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} TZ: "Asia/Tokyo"
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
vgcal-0.5.1 | .github/workflows/gem_release.yml |