Bump version to 0.3.5 to incorporate JRuby release fixes #7
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Publish gem to rubygems.org | |
| on: | |
| push: | |
| tags: | |
| - 'v*' | |
| permissions: | |
| contents: read | |
| jobs: | |
| push: | |
| if: github.repository == 'ruby/io-wait' | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| ruby: [ ruby, jruby ] | |
| environment: | |
| name: rubygems.org | |
| url: https://rubygems.org/gems/io-wait | |
| permissions: | |
| contents: write | |
| id-token: write | |
| steps: | |
| - name: Harden Runner | |
| uses: step-security/harden-runner@95d9a5deda9de15063e7595e9719c11c38c90ae2 # v2.13.2 | |
| with: | |
| egress-policy: audit | |
| - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 | |
| - name: Set up Ruby | |
| uses: ruby/setup-ruby@eaecf785f6a34567a6d97f686bbb7bccc1ac1e5c # v1.237.0 | |
| with: | |
| bundler-cache: true | |
| ruby-version: ${{ matrix.ruby }} | |
| - name: Set remote URL | |
| run: | | |
| # Attribute commits to the last committer on HEAD | |
| git config --global user.email "$(git log -1 --pretty=format:'%ae')" | |
| git config --global user.name "$(git log -1 --pretty=format:'%an')" | |
| git remote set-url origin "https://x-access-token:${{ github.token }}@github.com/$GITHUB_REPOSITORY" | |
| shell: bash | |
| - name: Configure trusted publishing credentials | |
| uses: rubygems/configure-rubygems-credentials@v1.0.0 | |
| - name: Install dependencies | |
| run: bundle install | |
| shell: bash | |
| - name: Run release rake task | |
| run: bundle exec rake release | |
| shell: bash | |
| - name: Wait for release to propagate | |
| run: gem exec rubygems-await pkg/*.gem | |
| shell: bash | |
| - name: Create GitHub release | |
| run: | | |
| tag_name="$(git describe --tags --abbrev=0)" | |
| gh release create "${tag_name}" --verify-tag --generate-notes | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| if: ${{ matrix.ruby == 'ruby' }} |