fix(rack): ensure OPTIONS preflight requests are handled #229
Workflow file for this run
This file contains 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: CI | |
on: push | |
jobs: | |
release-please: | |
name: Release Please | |
runs-on: ubuntu-latest | |
if: github.ref == 'refs/heads/main' | |
outputs: | |
release_created: ${{ steps.release-please.outputs.release_created }} | |
tag_name: ${{ steps.release-please.outputs.tag_name }} # e.g. v1.0.0 | |
version: ${{ steps.release-please.outputs.version }} # e.g. 1.0.0 | |
steps: | |
- uses: tibdex/github-app-token@v1 | |
id: generate-github-token | |
with: | |
app_id: ${{ vars.RELEASE_PLEASE_GITHUB_APP_ID }} | |
private_key: ${{ secrets.RELEASE_PLEASE_GITHUB_APP_PRIVATE_KEY }} | |
- uses: google-github-actions/release-please-action@v3 | |
id: release-please | |
with: | |
token: ${{ steps.generate-github-token.outputs.token }} | |
command: manifest | |
lint: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: ruby/setup-ruby@v1 | |
with: | |
ruby-version: 2.7 | |
- name: Configure Bundler | |
run: bundle config set rubygems.pkg.github.com "${{ secrets.KRYSTAL_GITHUB_PACKAGE_READ_KEY }}" | |
- name: Install dependencies | |
run: bundle install | |
- name: Run linter | |
run: bundle exec rake lint | |
test: | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
ruby_version: | |
- 2.5 | |
- 2.6 | |
- 2.7 | |
- "3.0" | |
- 3.1 | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: ruby/setup-ruby@v1 | |
with: | |
ruby-version: ${{ matrix.ruby_version }} | |
bundler-cache: true | |
- name: Configure Bundler | |
run: bundle config set rubygems.pkg.github.com "${{ secrets.KRYSTAL_GITHUB_PACKAGE_READ_KEY }}" | |
- name: Install dependencies | |
run: bundle install | |
- name: Run tests | |
run: bundle exec rake test | |
release: | |
runs-on: ubuntu-latest | |
needs: [release-please, test] | |
if: ${{ needs.release-please.outputs.release_created }} | |
steps: | |
- uses: actions/checkout@master | |
- name: Set up Ruby | |
uses: ruby/setup-ruby@v1 | |
with: | |
ruby-version: 3.1 | |
- name: Build Gem | |
run: gem build *.gemspec | |
- name: Setup credentials | |
run: | | |
mkdir -p $HOME/.gem | |
touch $HOME/.gem/credentials | |
chmod 0600 $HOME/.gem/credentials | |
printf -- "---\n:rubygems_api_key: ${RUBYGEMS_API_KEY}\n" > $HOME/.gem/credentials | |
env: | |
RUBYGEMS_API_KEY: ${{secrets.KRYSTAL_RUBYGEMS_API_KEY}} | |
- name: Publish to RubyGems | |
run: | | |
gem push *.gem |