Skip to content

Merge pull request #1362 from sanger/y24-096-certificate-bug-fix #611

Merge pull request #1362 from sanger/y24-096-certificate-bug-fix

Merge pull request #1362 from sanger/y24-096-certificate-bug-fix #611

# Automatically generate a release on develop and master
name: Automated release and build of project
on:
push:
branches:
- master
- develop
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: nelonoel/[email protected]
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
bundler-cache: true # Runs bundle install and caches gems. See the ruby_test.yml
# example if you need more control over bundler.
- name: Set release version
# On the develop branch this might create RELEASE_VERSION=2.4.6-987654321-develop
# On the master branch this would then only create RELEASE_VERSION=2.4.6
run: echo "RELEASE_VERSION=$(printf -- '%s%s\n' $(cat .release-version) $([ ${BRANCH_NAME} = "develop" ] && printf -- '-%s-develop' ${GITHUB_RUN_ID} || echo ""))" >> $GITHUB_ENV
- 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
- name: Create release and upload release.tar.gz
uses: ncipollo/[email protected]
with:
name: ${{ env.RELEASE_VERSION }}
tag: v${{ env.RELEASE_VERSION }}
prerelease: ${{ !(github.ref == 'refs/heads/master') }}
commit: ${{ github.sha }}
artifacts: release.tar.gz
artifactErrorsFailBuild: true