ci: Test with new CI commands to install Octopus CLI #119
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
name: Continous integration | |
on: | |
push: | |
branches: [master] | |
concurrency: | |
group: environment-${{ github.ref }}-ci | |
cancel-in-progress: true | |
jobs: | |
generate: | |
runs-on: ubuntu-20.04 | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set version | |
id: set-version | |
run: | | |
echo "PACKAGE_VERSION=$(date +'%Y.%m.%d.%H%M')" >> $GITHUB_ENV | |
- name: Setup .NET Core | |
uses: actions/setup-dotnet@v3 | |
with: | |
dotnet-version: 8.0.x | |
- name: Install Octopus CLI | |
run: | | |
dotnet tool install --global Octopus.DotNet.Cli | |
- name: Build and package site for publish | |
run: | | |
cd CFLookup && \ | |
dotnet publish CFLookup.csproj --output published-app --configuration Release -p:FileVersion="$PACKAGE_VERSION" -p:AssemblyVersion="$PACKAGE_VERSION" && \ | |
octo pack --id="whatcurseforgeprojectisthis" --version="$PACKAGE_VERSION" --basePath="./published-app" --outFolder="./published-app" && \ | |
octo push --package="./published-app/whatcurseforgeprojectisthis.$PACKAGE_VERSION.nupkg" --server="${{ secrets.OCTOPUS_SERVER_URL }}" --apiKey="${{ secrets.OCTOPUS_API_KEY }}" | |
- name: Build and package the bot for publish | |
run: | | |
cd CFDiscordBot && \ | |
dotnet publish CFDiscordBot.csproj --output published-bot --configuration Release -p:FileVersion="$PACKAGE_VERSION" -p:AssemblyVersion="$PACKAGE_VERSION" && \ | |
octo pack --id="cflookupbot" --version="$PACKAGE_VERSION" --basePath="./published-bot" --outFolder="./published-bot" && \ | |
octo push --package="./published-bot/cflookupbot.$PACKAGE_VERSION.nupkg" --server="${{ secrets.OCTOPUS_SERVER_URL }}" --apiKey="${{ secrets.OCTOPUS_API_KEY }}" |