Repository navigation
gate tool: skip (exit 0) when the golden file is missing #76
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-assets | ||
| on: | ||
| push: | ||
| tags: | ||
| - 'v*' | ||
| permissions: | ||
| contents: write | ||
| workflow_dispatch: | ||
| inputs: | ||
| tag: | ||
| description: 'Release tag to attach the assets to (defaults to the dispatching ref)' | ||
| required: false | ||
| type: string | ||
| jobs: | ||
| assets: | ||
| runs-on: ubuntu-latest | ||
| env: | ||
| BUNDLE_WITHOUT: "jsexec" | ||
| SKIP_JS: "1" | ||
| steps: | ||
| - name: Checkout monorepo | ||
| uses: actions/checkout@v7 | ||
| with: | ||
| repository: interscript/interscript | ||
| - name: Bootstrap packages | ||
| run: ruby bootstrap.rb | ||
| - name: Set up Ruby | ||
| uses: ruby/setup-ruby@v1 | ||
| with: | ||
| ruby-version: "3.3" | ||
| bundler-cache: true | ||
| working-directory: ruby | ||
| - name: Install bundle | ||
| working-directory: ruby | ||
| run: bundle install --jobs 4 --retry 3 --with jsexec | ||
| - name: Generate visualization JSON | ||
| working-directory: ruby | ||
| run: bundle exec rake generate_visualization_json | ||
| - name: Archive visualization JSON | ||
| uses: thedoctor0/zip-release@0.7.6 | ||
| with: | ||
| filename: 'vis_json.zip' | ||
| path: ./vis_json/*.json | ||
| directory: ./ruby/ | ||
| exclusions: '*.git*' | ||
| type: zip | ||
| - name: Upload visualization artifact | ||
| id: upload_vis_json | ||
| uses: svenstaro/upload-release-action@v2 | ||
| with: | ||
| repo_token: ${{ secrets.GITHUB_TOKEN }} | ||
| file: ruby/vis_json.zip | ||
| file_glob: true | ||
| tag: ${{ inputs.tag || github.ref }} | ||
| overwrite: true | ||
| - name: Generate metadata | ||
| working-directory: ruby | ||
| run: bundle exec rake generate_metadata_json | ||
| - name: Archive metadata | ||
| uses: thedoctor0/zip-release@0.7.6 | ||
| with: | ||
| filename: 'metadata.zip' | ||
| path: ./metadata.json | ||
| directory: ./ruby/ | ||
| exclusions: '*.git*' | ||
| type: zip | ||
| - name: Upload metadata | ||
| id: upload_metadata | ||
| uses: svenstaro/upload-release-action@v2 | ||
| with: | ||
| repo_token: ${{ secrets.GITHUB_TOKEN }} | ||
| file: ruby/metadata.zip | ||
| asset_name: metadata.json.zip | ||
| tag: ${{ inputs.tag || github.ref }} | ||
| overwrite: true | ||
| - name: Output links | ||
| run: | | ||
| echo ${{ steps.upload_vis_json.outputs.browser_download_url }} | ||
| echo ${{ steps.upload_metadata.outputs.browser_download_url }} | ||