-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
1a99fb8
commit 411d90f
Showing
1 changed file
with
26 additions
and
4 deletions.
There are no files selected for viewing
This file contains 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
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: | ||
|
@@ -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: | ||
|
@@ -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: | ||
|
@@ -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] | ||
|
@@ -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: {} | ||
|