Added infrastructure and bicep #3
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
on: | |
push: | |
branches: | |
- "develop" | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
name: Build | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Set up .NET Core | |
uses: actions/setup-dotnet@v1 | |
with: | |
dotnet-version: '6.0.x' | |
include-prerelease: true | |
- name: Install dependencies | |
run: dotnet restore . | |
- name: Build | |
run: dotnet publish ./src/ATIL.FeeCalculator.csproj --configuration Release --no-restore -o publish | |
- name: checkout octopus | |
uses: OctopusDeploy/[email protected] | |
- name: pack & push to octo | |
run: | | |
BRANCHNAME=${{github.ref_name}} | |
MY_VAR="1.0.${{github.run_number}}-beta" | |
octo pack --basePath=infrastructure --id atil_feecalculator-infrastructure --version $MY_VAR --outFolder ./infra --format zip | |
octo push --package "./infra/atil_feecalculator-infrastructure.${MY_VAR}.zip" --server="${{ secrets.OCTOPUS_SERVER }}" --apiKey="${{ secrets.OCTOPUS_APIKEY }}" | |
octo pack --basePath=publish --id atil_feecalculator --version $MY_VAR --outFolder ./out --format zip | |
octo push --package "./out/atil_feecalculator.${MY_VAR}.zip" --server="${{ secrets.OCTOPUS_SERVER }}" --apiKey="${{ secrets.OCTOPUS_APIKEY }}" | |
octo create-release --project="ATIL - Fee Calculator API" --server="${{ secrets.OCTOPUS_SERVER }}" --apiKey="${{ secrets.OCTOPUS_APIKEY }}" --channel=Dev | |