name: Rspec and Release on: push: pull_request: workflow_dispatch: jobs: rspec: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 - name: Set up Ruby 2.7.2 uses: ruby/setup-ruby@v1 with: ruby-version: 2.7 bundler-cache: true - name: Test with Rspec run: | bundle exec rspec --format documentation release: if: github.event_name == 'push' needs: rspec runs-on: ubuntu-latest env: BUNDLE_WITHOUT: "development:test" BUNDLE_DEPLOYMENT: "true" steps: - uses: actions/checkout@v2 - name: Set up Ruby 2.7.2 uses: ruby/setup-ruby@v1 with: ruby-version: 2.7 bundler-cache: true - name: Zip run : | zip -r datadog_backup.zip ./* - name: Semantic Release id: semantic uses: cycjimmy/semantic-release-action@v2 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} GEM_HOST_API_KEY: ${{ secrets.RUBYGEMS_API_TOKEN }} with: semantic_version: 17 extra_plugins: | @semantic-release/changelog @semantic-release/git semantic-release-rubygem