Skip to content

Commit

Permalink
Update ruby.yaml
Browse files Browse the repository at this point in the history
  • Loading branch information
mcasperson authored Jan 20, 2022
1 parent 1a99fb8 commit 411d90f
Showing 1 changed file with 26 additions and 4 deletions.
30 changes: 26 additions & 4 deletions .github/workflows/ruby.yaml
Original file line number Diff line number Diff line change
@@ -1,21 +1,35 @@
# The following workflow provides an opinionated template you can customize for your own needs.
#
# To configure Octopus, set the OCTOPUS_API_TOKEN secret to the Octopus API key, and
# set the OCTOPUS_SERVER_URL secret to the Octopus URL.
#
# Double check the "project" and "deploy_to" properties in the "Create Octopus Release" step
# match your Octopus projects and environments.
#
# Get a trial Octopus instance from https://octopus.com/start

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
with:
fetch-depth: '0'
- uses: actions/setup-ruby@v1
- name: Set up Ruby
uses: actions/setup-ruby@v1
with:
ruby-version: '2.7'
- run: gem install bundler
- name: Install Bundler
run: gem install bundler
- name: Install GitVersion
uses: gittools/actions/gitversion/[email protected]
with:
versionSpec: 5.x
- id: determine_version
name: Determine Version
uses: gittools/actions/gitversion/[email protected]
with:
additionalArguments: /overrideconfig mode=Mainline
- name: Install Octopus Deploy CLI
uses: OctopusDeploy/[email protected]
with:
Expand Down Expand Up @@ -78,14 +92,19 @@ jobs:
--include '**/*.txt' \
--include '**/*.Procfile'
shell: bash
- name: Tag Release
uses: mathieudutour/[email protected]
with:
custom_tag: ${{ steps.determine_version.outputs.semVer }}
github_token: ${{ secrets.GITHUB_TOKEN }}
- env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
id: create_release
name: Create Release
uses: actions/create-release@v1
with:
tag_name: ${{ steps.determine_version.outputs.semVer }}.${{ github.run_number }}
release_name: Release ${{ steps.determine_version.outputs.semVer }}.${{ github.run_number }}
tag_name: ${{ steps.determine_version.outputs.semVer }}+run${{ github.run_number }}-attempt${{ github.run_attempt }}
release_name: Release ${{ steps.determine_version.outputs.semVer }} Run ${{ github.run_number }} Attempt ${{ github.run_attempt }}
draft: 'false'
prerelease: 'false'
- env:
Expand All @@ -103,6 +122,7 @@ jobs:
api_key: ${{ secrets.OCTOPUS_API_TOKEN }}
packages: RandomQuotes-Ruby.${{ steps.determine_version.outputs.semVer }}.zip
server: ${{ secrets.OCTOPUS_SERVER_URL }}
overwrite_mode: OverwriteExisting
- name: Generate Octopus Deploy build information
uses: xo-energy/[email protected]
with:
Expand All @@ -111,6 +131,7 @@ jobs:
octopus_server: ${{ secrets.OCTOPUS_SERVER_URL }}
push_version: ${{ steps.determine_version.outputs.semVer }}
push_package_ids: RandomQuotes-Ruby
push_overwrite_mode: OverwriteExisting
output_path: octopus
- name: Create Octopus Release
uses: OctopusDeploy/[email protected]
Expand All @@ -119,6 +140,7 @@ jobs:
project: RandomQuotes-Ruby
server: ${{ secrets.OCTOPUS_SERVER_URL }}
deploy_to: Development
packages: RandomQuotes-Ruby:${{ steps.determine_version.outputs.semVer }}
name: Ruby Build
'on':
workflow_dispatch: {}
Expand Down

0 comments on commit 411d90f

Please sign in to comment.