Merge pull request #1771 from sanger/rails-8.1-upgrade #964
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
| # Automatically generate a release on develop and master | |
| name: Automated release and build of project | |
| on: | |
| push: | |
| branches: | |
| - master | |
| - develop | |
| env: | |
| BRANCH_NAME: ${{ github.ref_name }} | |
| jobs: | |
| automated_release: | |
| name: Automated Release | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout Repository | |
| uses: sanger/.github/.github/actions/setup/checkout@master | |
| - name: Setup Ruby | |
| uses: sanger/.github/.github/actions/setup/ruby@master | |
| - name: Get release version | |
| id: get_version | |
| run: echo "RELEASE_VERSION=$(cat .release-version)" >> "$GITHUB_ENV" | |
| # Create a release tag based on the branch name and .release-version file | |
| - name: Set release tag | |
| id: set_tag | |
| uses: sanger/.github/.github/actions/release/set-release-tag@master | |
| with: | |
| branch_name: ${{ env.BRANCH_NAME }} | |
| release_version: ${{ env.RELEASE_VERSION }} | |
| github_run_id: ${{ github.run_id }} | |
| - name: Set up environment | |
| run: | | |
| cp config/database.yml.example config/database.yml | |
| cp config/mailer.yml.example config/mailer.yml | |
| cp config/bunny.yml.example config/bunny.yml | |
| - name: Compile Build | |
| run: ./compile-build | |
| # Create a GitHub release with the release asset as an artifact | |
| - name: Create release and upload release.tar.gz | |
| uses: sanger/.github/.github/actions/release/create-release@master | |
| with: | |
| release_name: ${{ steps.set_tag.outputs.release_version_tag }} | |
| github_ref: ${{ github.ref }} | |
| commit_sha: ${{ github.sha }} |