Fixed: Campaign Banned units not transferred to generated mission tem… #22
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: release | |
on: | |
push: | |
branches: ["release"] | |
jobs: | |
build: | |
runs-on: windows-latest | |
steps: | |
- name: Set git to use LF | |
run: | | |
git config --global core.autocrlf false | |
git config --global core.eol crlf | |
- uses: actions/checkout@v1 | |
name: Checkout Code | |
- name: Setup .NET Core SDK | |
uses: actions/setup-dotnet@v1 | |
with: | |
dotnet-version: "9.0.x" | |
- name: Restore NuGet Packages | |
run: dotnet restore src/BriefingRoom.sln | |
- name: Get current time | |
uses: 1466587594/get-current-time@v2 | |
id: current-time | |
with: | |
format: YYMMDD-HHMMSS | |
utcOffset: "+00:00" | |
- name: Get current date | |
uses: 1466587594/get-current-time@v2 | |
id: current-date | |
with: | |
format: YMM.DD | |
utcOffset: "+00:00" | |
- name: Set Build Version | |
id: build_version | |
run: | | |
(Get-Content -path src\BriefingRoom\BriefingRoom.cs -Raw) -replace '~BUILD_VERSION~','${{ steps.current-time.outputs.formattedTime }}' | Set-Content src\BriefingRoom\BriefingRoom.cs | |
- name: Set Release Version | |
id: release_version | |
run: | | |
(Get-Content -path src\BriefingRoom\BriefingRoom.cs -Raw) -replace '~RELEASE_VERSION~','${{ steps.current-date.outputs.formattedTime }}' | Set-Content src\BriefingRoom\BriefingRoom.cs | |
- name: Build and Publish App | |
run: | | |
dotnet publish src/CommandLine -o BriefingRoom-V0.5.${{ steps.current-date.outputs.formattedTime }} -c Release | |
dotnet publish src/Web -o BriefingRoom-V0.5.${{ steps.current-date.outputs.formattedTime }} -c Release | |
dotnet publish src/Desktop -o BriefingRoom-V0.5.${{ steps.current-date.outputs.formattedTime }} -c Release | |
- name: Zip Release | |
run: 7z a -tzip BriefingRoom-V0.5.${{ steps.current-date.outputs.formattedTime }}.zip BriefingRoom-V0.5.${{ steps.current-date.outputs.formattedTime }} "-xr!.git\" "-xr!.github\" "-xr!.git*" "-xr!.vscode\" "-xr!dataExtractors\" "-xr!src\" "-xr!docs\" "-x!*.bat" "-x!*.filelist" | |
- name: Create Changelog | |
id: change_log | |
shell: bash | |
run: | | |
LOGS=$(git log --pretty=format:"%s" HEAD...$(git describe --tags --match="release*" --abbrev=0 HEAD)) | |
LOGS="${LOGS//'%'/'%25'}" | |
LOGS="${LOGS//$'\n'/'%0A'}" | |
LOGS="${LOGS//$'\r'/'%0D'}" | |
echo "::set-output name=log::$LOGS" | |
- name: Upload Release | |
uses: ncipollo/release-action@v1 | |
with: | |
tag: "release-${{ steps.current-date.outputs.formattedTime }}-${{ steps.current-time.outputs.formattedTime }}-${{ github.run_id }}-${{ github.run_attempt }}" | |
name: "Version 0.5.${{ steps.current-date.outputs.formattedTime }}" | |
body: | | |
${{ steps.change_log.outputs.log }} | |
prerelease: false | |
artifacts: "BriefingRoom-V0.5.${{ steps.current-date.outputs.formattedTime }}.zip" | |
token: ${{ secrets.GITHUB_TOKEN }} | |
- name: Post to Discord | |
uses: tsickert/[email protected] | |
with: | |
webhook-url: ${{ secrets.DISCORD_WEBHOOK }} | |
content: | | |
@everyone New Release out https://github.com/DCS-BR-Tools/briefing-room-for-dcs/releases/tag/release-${{ steps.current-date.outputs.formattedTime }}-${{ steps.current-time.outputs.formattedTime }}-${{ github.run_id }}-${{ github.run_attempt }} | |
${{ steps.change_log.outputs.log }} | |
docker: | |
name: docker build and push | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
- name: Set up QEMU | |
uses: docker/setup-qemu-action@v3 | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v3 | |
- name: Login to Docker Hub | |
uses: docker/login-action@v3 | |
with: | |
username: ${{ secrets.DOCKERHUB_USERNAME }} | |
password: ${{ secrets.DOCKERHUB_TOKEN }} | |
- name: Get current time | |
uses: 1466587594/get-current-time@v2 | |
id: current-time | |
with: | |
format: YYMMDD-HHMMSS | |
utcOffset: "+00:00" | |
- name: Get current date | |
uses: 1466587594/get-current-time@v2 | |
id: current-date | |
with: | |
format: YMM.DD | |
utcOffset: "+00:00" | |
- name: Set Build Version | |
id: build_version | |
run: | | |
sed -i 's/~BUILD_VERSION~/${{ steps.current-time.outputs.formattedTime }}/g' ./src/BriefingRoom/BriefingRoom.cs | |
- name: Set Release Version | |
id: release_version | |
run: | | |
sed -i 's/~RELEASE_VERSION~/${{ steps.current-date.outputs.formattedTime }}/g' ./src/BriefingRoom/BriefingRoom.cs | |
- name: Build and push | |
uses: docker/build-push-action@v6 | |
with: | |
push: true | |
tags: johnharvey/dcs-briefing-room-web:0.5.${{ steps.current-date.outputs.formattedTime }} |