Fix environment variable syntax in GitHub workflows #9
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: Release | ||
| permissions: | ||
| contents: read | ||
| on: | ||
| push: | ||
| tags: | ||
| - v* | ||
| concurrency: | ||
| group: release | ||
| cancel-in-progress: true | ||
| env: | ||
| RUBY_VERSION: 3.4.3 | ||
| APP_DIR: ${{ github.workspace }}/mat_views | ||
| jobs: | ||
| setup: | ||
| name: Setup | ||
| runs-on: ubuntu-latest | ||
| defaults: | ||
| run: | ||
| working-directory: $APP_DIR | ||
| steps: | ||
| - uses: actions/checkout@v5 | ||
| - uses: ruby/setup-ruby@v1 | ||
| with: | ||
| ruby-version: $RUBY_VERSION | ||
| bundler-cache: true | ||
| working-directory: $APP_DIR | ||
| - run: bundle info rake | ||
| lint: | ||
| permissions: | ||
| contents: read | ||
| runs-on: ubuntu-latest | ||
| needs: setup | ||
| defaults: | ||
| run: | ||
| working-directory: $APP_DIR | ||
| steps: | ||
| - uses: actions/checkout@v5 | ||
| - uses: ruby/setup-ruby@v1 | ||
| with: | ||
| ruby-version: $RUBY_VERSION | ||
| bundler-cache: true | ||
| working-directory: $APP_DIR | ||
| - name: RuboCop | ||
| run: bin/rubocop -f github | ||
| reek: | ||
| permissions: | ||
| contents: read | ||
| runs-on: ubuntu-latest | ||
| needs: setup | ||
| defaults: | ||
| run: | ||
| working-directory: $APP_DIR | ||
| steps: | ||
| - uses: actions/checkout@v5 | ||
| - uses: ruby/setup-ruby@v1 | ||
| with: | ||
| ruby-version: $RUBY_VERSION | ||
| bundler-cache: true | ||
| working-directory: $APP_DIR | ||
| - name: Reek | ||
| run: bin/reek | ||
| tests: | ||
| needs: [lint, reek] | ||
| uses: ./.github/workflows/ruby-tests.yml | ||
| with: | ||
| ruby_version: $RUBY_VERSION | ||
| app_dir: $APP_DIR | ||
| rspec_task: "bin/rspec-unit" | ||
| need_seed: true | ||
| need_firefox: false | ||
| upload_coverage: true | ||
| qlty_coverage: true | ||
| secrets: | ||
| QLTY_COVERAGE_TOKEN: ${{ secrets.QLTY_COVERAGE_TOKEN }} | ||
| e2e_tests: | ||
| needs: [lint, reek] | ||
| uses: ./.github/workflows/ruby-tests.yml | ||
| with: | ||
| ruby_version: $RUBY_VERSION | ||
| app_dir: $APP_DIR | ||
| rspec_task: "bin/rspec-e2e" | ||
| need_seed: false | ||
| need_firefox: true | ||
| upload_coverage: false | ||
| push: | ||
| name: Build & Push gem | ||
| runs-on: ubuntu-latest | ||
| needs: test | ||
| permissions: | ||
| contents: write | ||
| id-token: write | ||
| environment: release | ||
| steps: | ||
| - uses: actions/checkout@v5 | ||
| with: | ||
| persist-credentials: false | ||
| - uses: ruby/setup-ruby@v1 | ||
| with: | ||
| ruby-version: $RUBY_VERSION | ||
| bundler-cache: true | ||
| working-directory: $APP_DIR | ||
| - name: Configure RubyGems Credentials | ||
| uses: rubygems/configure-rubygems-credentials@main | ||
| - name: Release | ||
| run: | | ||
| cd mat_views | ||
| gem build mat_views.gemspec | ||
| gem push mat_views-*.gem | ||