build(deps): bump actions/upload-artifact from 5 to 6 #172
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
| # Copyright (C) 2023-2025 Sutou Kouhei <[email protected]> | |
| # | |
| # This program is free software; you can redistribute it and/or modify | |
| # it under the terms of the GNU General Public License as published by | |
| # the Free Software Foundation; either version 2 of the License, or | |
| # (at your option) any later version. | |
| # | |
| # This program is distributed in the hope that it will be useful, | |
| # but WITHOUT ANY WARRANTY; without even the implied warranty of | |
| # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
| # GNU General Public License for more details. | |
| # | |
| # You should have received a copy of the GNU General Public License along | |
| # with this program; if not, write to the Free Software Foundation, Inc., | |
| # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. | |
| name: Release | |
| on: | |
| push: | |
| pull_request: | |
| jobs: | |
| github: | |
| name: GitHub | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 10 | |
| steps: | |
| - uses: actions/checkout@v6 | |
| with: | |
| path: rabbit | |
| - uses: actions/checkout@v6 | |
| with: | |
| repository: rabbit-shocker/rabbirack | |
| path: rabbirack | |
| - uses: actions/checkout@v6 | |
| with: | |
| repository: rabbit-shocker/rabwii | |
| path: rabwii | |
| - uses: ruby/setup-ruby@v1 | |
| with: | |
| ruby-version: ruby | |
| - name: Install dependencies | |
| run: | | |
| cd rabbit | |
| bundle install | |
| - name: Install additional dependencies | |
| run: | | |
| cd rabbit | |
| sudo apt install -y -V \ | |
| at-spi2-core \ | |
| gimp \ | |
| inkscape \ | |
| xvfb | |
| - name: Generate docs | |
| run: | | |
| cd rabbit | |
| export LOCAL_DESTINATION_PATH="${PWD}/docs" | |
| dbus-run-session \ | |
| xvfb-run --server-args "-screen 0 640x480x24" \ | |
| bundle exec rake html:publish:local | |
| tar cfz ../docs.tar.gz docs | |
| - uses: actions/upload-artifact@v6 | |
| with: | |
| name: docs | |
| path: docs.tar.gz | |
| - name: Extract release note | |
| run: | | |
| cd rabbit | |
| ruby \ | |
| -e 'print("## Rabbit "); \ | |
| puts(ARGF.read.split(/^== /)[1]. \ | |
| gsub(/^(=+)/) {$1.gsub("=", "#")}. \ | |
| gsub(/\(\(<(.+?)\|URL:(.+?)>\)\)/) {$1}. \ | |
| gsub(/\(\({(.+?)}\)\)/, "`\\1`"))' \ | |
| doc/en/news.rd | tee release-note.md | |
| - name: Upload to release | |
| if: github.ref_type == 'tag' | |
| run: | | |
| cd rabbit | |
| title=$(head -n1 release-note.md | sed -e 's/^## //') | |
| tail -n +2 release-note.md > release-note-without-version.md | |
| gh release create ${GITHUB_REF_NAME} \ | |
| --discussion-category Announcements \ | |
| --notes-file release-note-without-version.md \ | |
| --title "${title}" \ | |
| ../docs.tar.gz | |
| env: | |
| GH_TOKEN: ${{ github.token }} | |
| rubygems: | |
| name: RubyGems | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 10 | |
| permissions: | |
| # We want to use this but this doesn't work. | |
| # id-token: ${{ github.ref_type == 'tag' && 'write' || 'read' }} | |
| id-token: write | |
| environment: release | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: ruby/setup-ruby@v1 | |
| with: | |
| ruby-version: ruby | |
| - name: Install dependencies | |
| run: | | |
| bundle install | |
| - name: Build gem | |
| if: github.ref_type != 'tag' | |
| run: | | |
| bundle exec rake build | |
| - uses: rubygems/[email protected] | |
| if: github.ref_type == 'tag' | |
| - name: Push gems | |
| if: github.ref_type == 'tag' | |
| run: | | |
| bundle exec rake release:rubygem_push |