Merge pull request #365 from github/dependabot/github_actions/actions… #243
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: build | |
| on: | |
| push: | |
| branches: | |
| - main | |
| pull_request: | |
| branches: | |
| - main | |
| workflow_call: | |
| permissions: | |
| contents: read | |
| jobs: | |
| build: | |
| name: build | |
| strategy: | |
| matrix: | |
| os: [ubuntu-latest, macos-latest] | |
| runs-on: ${{ matrix.os }} | |
| steps: | |
| - name: checkout | |
| uses: actions/checkout@v6 | |
| - uses: ruby/setup-ruby@ab177d40ee5483edb974554986f56b33477e21d0 # pin@v1.265.0 | |
| with: | |
| bundler-cache: true | |
| - name: build | |
| run: | | |
| GEM_NAME=$(ls | grep gemspec | cut -d. -f1) | |
| echo "Attempting to build gem $GEM_NAME..." | |
| gem build $GEM_NAME | |
| if [ $? -eq 0 ]; then | |
| echo "Gem built successfully!" | |
| else | |
| echo "Gem build failed!" | |
| exit 1 | |
| fi |