Skip to content

Commit

Permalink
added manual release creation workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
BenTopping committed Feb 10, 2021
1 parent 7abc5f1 commit 06d4cdf
Show file tree
Hide file tree
Showing 2 changed files with 45 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
name: Build Project
# Automatically generate a release on develop and master
# Note: This does *not* trigger the `release: published` action so will not
# cause the build.yml action to fire.
name: Automated release and build of project

on:
push:
Expand Down Expand Up @@ -49,5 +52,5 @@ jobs:
with:
upload_url: ${{ steps.create_release.outputs.upload_url }} # Pull the upload url from previous events
asset_path: ./release.tar.gz
asset_name: gh-release.tar.gz
asset_name: release.tar.gz
asset_content_type: application/gzip
40 changes: 40 additions & 0 deletions .github/workflows/manual_build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
# Triggers on *manual* release creation only. Automated releases
# handle asset creation in automated_release_and_build.yml.

name: Build Manual Release

on:
release:
types: published

jobs:
build:
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 gems. See the ruby_test.yml
# example if you need more control over bundler.

- 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
cp config/env_constants.yml.example config/env_constants.yml
- name: Compile Build
run: ./compile-build

- name: Upload release.gz
id: upload-release-gz
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ github.event.release.upload_url }} # Pull the URL from the release step
asset_path: ./release.tar.gz
asset_name: release.tar.gz
asset_content_type: application/gzip

0 comments on commit 06d4cdf

Please sign in to comment.