-
-
Notifications
You must be signed in to change notification settings - Fork 1
40 lines (32 loc) · 1.48 KB
/
CI.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
name: Continous integration
on:
push:
branches: [master]
concurrency:
group: environment-${{ github.ref }}-ci
cancel-in-progress: true
jobs:
generate:
runs-on: ubuntu-latest
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: |
sudo apt update && sudo apt install --no-install-recommends gnupg curl ca-certificates apt-transport-https && \
curl -sSfL https://apt.octopus.com/public.key | sudo apt-key add - && \
sudo sh -c "echo deb https://apt.octopus.com/ stable main > /etc/apt/sources.list.d/octopus.com.list" && \
sudo apt update && sudo apt install octopuscli
- 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 }}"