sanger/sequencescape

View on GitHub
.github/workflows/append_release.yml

Summary

Maintainability
Test Coverage
name: Automatic appending of build product to releases

on:
  release:
    types: published

jobs:
  build-and-append-to-release:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v2

      - name: Set up Ruby
        uses: ruby/setup-ruby@v1
        with:
          bundler-cache: true # runs 'bundle install' and caches installed gems automatically
      - name: Setup node
        uses: actions/setup-node@v3
        with:
          node-version-file: ".nvmrc"
          cache: "yarn"

      - name: Setup environment
        env:
          DBPORT: ${{ job.services.mysql.ports[3306] }}
        run: |
          bundle config path vendor/bundle
          bin/setup

      # Actually run our build
      - name: Compile Build
        run: ./compile-build

      # Upload the release asset as an artifact to the existing release
      - uses: shogo82148/actions-upload-release-asset@v1.3.1
        with:
          upload_url: ${{ github.event.release.upload_url }}
          asset_path: release.tar.gz
          asset_content_type: application/gzip