forked from KitsuneLab-Development/CS2-SteamRestrict
-
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.
add CI, make age check non prime only
- Loading branch information
1 parent
432170e
commit becc475
Showing
2 changed files
with
74 additions
and
1 deletion.
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 |
---|---|---|
@@ -0,0 +1,73 @@ | ||
name: .NET Build and Release | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
- master | ||
- dev | ||
pull_request: | ||
branches: | ||
- main | ||
- master | ||
- dev | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
|
||
container: | ||
image: mcr.microsoft.com/dotnet/nightly/sdk:8.0 | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- name: Restore dependencies | ||
run: dotnet restore ./src/KitsuneSteamRestrict.csproj | ||
|
||
- name: Build | ||
run: dotnet publish --configuration Release ./src/KitsuneSteamRestrict.csproj | ||
|
||
- name: Archive production artifacts | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
name: net8.0-artifacts | ||
path: | | ||
src/bin/KitsuneSteamRestrict* | ||
release: | ||
needs: build | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Download artifact | ||
uses: actions/download-artifact@v2 | ||
with: | ||
name: net8.0-artifacts | ||
path: bin/Debug/net8.0 | ||
|
||
- name: Archive | ||
run: cd /home/runner/work/CS2-SteamRestrict/CS2-SteamRestrict/bin/Debug/net8.0 && zip /home/runner/work/CS2-SteamRestrict/CS2-SteamRestrict/SteamRestrict.zip ./* -r | ||
|
||
- name: Create Tag | ||
id: tag_version | ||
run: | | ||
DATE=$(date +'%y.%m.%d-%H%M%S') | ||
echo "RELEASE_TAG=$DATE" >> $GITHUB_ENV | ||
- name: Determine if Pre-release | ||
id: prerelease | ||
run: | | ||
if [ "${{ github.ref }}" != "refs/heads/main" ]; then | ||
echo "IS_PRERELEASE=true" >> $GITHUB_ENV | ||
else | ||
echo "IS_PRERELEASE=false" >> $GITHUB_ENV | ||
fi | ||
- name: Create Release | ||
uses: softprops/action-gh-release@v1 | ||
with: | ||
tag_name: ${{ env.RELEASE_TAG }} | ||
files: SteamRestrict.zip | ||
prerelease: ${{ env.IS_PRERELEASE }} | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
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