Release DCS-BIOS nightly build #163
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 DCS-BIOS nightly build | |
on: | |
schedule: | |
# * is a special character in YAML so you have to quote this string | |
# Release at 22.00, Github does not guarantee exact time | |
- cron: '0 22 * * *' | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
name: Run unit tests | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Set up lua | |
uses: leafo/gh-actions-lua@v10 | |
with: | |
luaVersion: "5.1.5" | |
- name: compile | |
run: | | |
lua ./Scripts/DCS-BIOS/test/compile/LocalCompile.lua | |
- name: test | |
run: | | |
lua ./Scripts/DCS-BIOS/test/TestSuite.lua | |
release: | |
needs: test | |
runs-on: ubuntu-latest | |
permissions: | |
contents: write | |
name: Release zip file | |
steps: | |
- name: Get current date | |
id: date | |
run: echo "::set-output name=date::$(date +'%F')" | |
- name: Set release filename | |
id: filename | |
run: echo "::set-output name=zip::DCS-BIOS_nightly_${{ steps.date.outputs.date }}.zip" | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Archive Release | |
uses: thedoctor0/[email protected] | |
with: | |
type: zip | |
filename: '${{ steps.filename.outputs.zip }}' | |
directory: './Scripts' | |
exclusions: '/*test/*' | |
- name: Update latest tag | |
uses: rickstaa/action-create-tag@v1 | |
id: tag_create | |
with: | |
tag: latest | |
force_push_tag: true | |
message: Nightly build of master branch | |
- name: Upload Release | |
uses: ncipollo/release-action@v1 | |
with: | |
allowUpdates: true | |
artifactErrorsFailBuild: true | |
artifacts: './Scripts/${{ steps.filename.outputs.zip }}' | |
commit: master | |
makeLatest: true | |
name: 'DCS-BIOS Nightly ${{ steps.date.outputs.date }}' | |
prerelease: true | |
removeArtifacts: true | |
tag: latest | |
updateOnlyUnreleased: true |