v2.0.7 #30
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
on: | |
workflow_dispatch: | |
release: | |
types: [released] | |
name: Deploy and Create Release | |
jobs: | |
build: | |
permissions: | |
checks: write | |
pull-requests: write | |
id-token: write | |
packages: write # for pushing GitHub packages | |
name: Upload Release Asset | |
runs-on: ubuntu-latest | |
steps: | |
- uses: ruby/setup-ruby@v1 | |
with: | |
ruby-version: jruby | |
bundler-cache: true | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
- name: Run gradle vendor | |
run: ./gradlew vendor | |
- name: Build gem | |
run: jruby -S gem build *.gemspec | |
- name: Get release | |
id: get_release | |
uses: bruceadams/get-release@v1.2.2 | |
env: | |
GITHUB_TOKEN: ${{ github.token }} | |
- name: Publish gem | |
uses: dawidd6/action-publish-gem@v1 | |
with: | |
api_key: ${{secrets.RUBYGEMS_KEY}} | |
github_token: ${{secrets.GITHUB_TOKEN}} | |
- name: Set artifact name | |
id: set_artifact_name | |
run: | | |
ARTIFACT_PATH=$(find . -maxdepth 1 -iname '*.gem') | |
echo "::set-output name=artifact_name::$ARTIFACT_PATH" | |
- name: Upload Release Asset | |
id: upload-release-asset | |
uses: actions/upload-release-asset@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
upload_url: ${{ steps.get_release.outputs.upload_url }} | |
asset_path: ./${{ steps.set_artifact_name.outputs.artifact_name }} | |
asset_name: ${{ steps.set_artifact_name.outputs.artifact_name }} | |
asset_content_type: application/zip |