-
Notifications
You must be signed in to change notification settings - Fork 47
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #67 from Mixone-FinallyHere/patch-1
Create base-build-nightly.yaml
- Loading branch information
Showing
1 changed file
with
57 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 |
---|---|---|
@@ -0,0 +1,57 @@ | ||
name: DSPRE Canary Build | ||
|
||
on: | ||
push: | ||
branches: | ||
- main # Trigger only on pushes to the main branch | ||
|
||
permissions: | ||
contents: write | ||
|
||
env: | ||
SOLUTION_FILE_PATH: DS_Map.sln | ||
BUILD_CONFIGURATION: Release | ||
|
||
jobs: | ||
build: | ||
runs-on: windows-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- name: Add MSBuild to PATH | ||
uses: microsoft/[email protected] | ||
|
||
- name: Restore NuGet packages | ||
working-directory: ${{env.GITHUB_WORKSPACE}} | ||
run: nuget restore ${{env.SOLUTION_FILE_PATH}} | ||
|
||
- name: Build DSPRE | ||
working-directory: ${{env.GITHUB_WORKSPACE}} | ||
run: msbuild /m /p:Configuration=${{env.BUILD_CONFIGURATION}} ${{env.SOLUTION_FILE_PATH}} | ||
|
||
- name: Zip Release Files | ||
run: Compress-Archive -Path ${{env.GITHUB_WORKSPACE}}DS_Map\bin\Release -DestinationPath DSPRE-canary.zip | ||
|
||
- name: Fetch tags | ||
run: git fetch --prune --unshallow --tags | ||
|
||
- name: Delete previous release | ||
run: | | ||
gh release delete --yes canary | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
- name: Get current date | ||
id: date | ||
run: echo "::set-output name=date::$(date +'%Y-%m-%d')" | ||
|
||
- name: Create new release | ||
uses: softprops/action-gh-release@v2 | ||
with: | ||
tag_name: canary | ||
name: DSPRE Canary Build ${{ steps.date.outputs.date }} | ||
files: DSPRE-canary.zip | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
prerelease: true | ||
generate_release_notes: true |