-
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.
* gh release cd gha * sudo for apt * make output dir before publish * fix mkdir * setup dotnet v4 * add release token * paths option for docker ci * only on main + v tagged pushes
- Loading branch information
1 parent
616cd7a
commit cee413e
Showing
2 changed files
with
43 additions
and
0 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 |
---|---|---|
|
@@ -4,6 +4,9 @@ on: | |
push: | ||
branches-ignore: | ||
- "main" | ||
paths: | ||
- '**.cs' | ||
- 'Dockerfile' | ||
|
||
env: | ||
TEST_TAG: user/app:test | ||
|
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 |
---|---|---|
@@ -0,0 +1,40 @@ | ||
name: dotnet package | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
tags: | ||
- v** | ||
|
||
env: | ||
dotnet-version: '8.0.x' | ||
|
||
jobs: | ||
linux-x64: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Setup dotnet | ||
uses: actions/setup-dotnet@v4 | ||
with: | ||
dotnet-version: ${{ env.dotnet-version }} | ||
- name: Install project dependencies | ||
run: dotnet restore | ||
- name: Install dotnet AOT dependencies | ||
run: | | ||
sudo apt-get update \ | ||
&& sudo apt-get install -y --no-install-recommends \ | ||
clang zlib1g-dev | ||
- run: sudo mkdir /app && sudo mkdir /app/linux-x64 | ||
- name: Compile exectuable | ||
run: sudo dotnet publish -r linux-x64 -c Release -o /app/linux-x64/ CloseAsteroids.csproj | ||
- name: Release | ||
uses: softprops/action-gh-release@v2 | ||
if: startsWith(github.ref, 'refs/tags/') | ||
with: | ||
name: ${{ github.ref_name }} | ||
token: ${{ secrets.RELEASE_TOKEN }} | ||
files: | | ||
/app/* | ||