server
Clone or download
Modified Files
name: Release
name: Release
on:
on:
workflow_run:
workflow_run:
workflows: ["Build"]
workflows: ["Build"]
types:
types:
- completed
- completed
jobs:
jobs:
release:
release:
runs-on: ubuntu-20.04
runs-on: ubuntu-20.04
steps:
steps:
- name: Download VERSION
- name: Download VERSION
uses: dawidd6/action-download-artifact@v2
uses: dawidd6/action-download-artifact@v2
with:
with:
workflow: init.yml
workflow: init.yml
name: version
name: version
- name: Add Version to environment
- name: Add Version to environment
run: |
run: |
echo "VERSION=$(<version.txt)" >> $GITHUB_ENV
echo "VERSION=$(<version.txt)" >> $GITHUB_ENV
- name: Download windows msi
- name: Download windows msi
uses: dawidd6/action-download-artifact@v2
uses: dawidd6/action-download-artifact@v2
with:
with:
workflow: build.yml
workflow: build.yml
name: windows-msi
name: windows-msi
path: target/install
path: target/install
- name: Download linux deb
- name: Download linux deb
uses: dawidd6/action-download-artifact@v2
uses: dawidd6/action-download-artifact@v2
with:
with:
workflow: build.yml
workflow: build.yml
name: linux-deb
name: linux-deb
path: target/install
path: target/install
- name: Download linux zip
- name: Download linux zip
uses: dawidd6/action-download-artifact@v2
uses: dawidd6/action-download-artifact@v2
with:
with:
workflow: build.yml
workflow: build.yml
name: linux-zip
name: linux-zip
path: target/install
path: target/install
- name: Download MacOS dmg
- name: Download MacOS dmg
uses: dawidd6/action-download-artifact@v2
uses: dawidd6/action-download-artifact@v2
with:
with:
workflow: build.yml
workflow: build.yml
name: macos-dmg
name: macos-dmg
path: target/install
path: target/install
- name: Delete old release if exists
- name: Delete old release if exists
uses: dev-drprasad/delete-tag-and-release@v0.2.0
uses: dev-drprasad/delete-tag-and-release@v0.2.0
continue-on-error: true
continue-on-error: true
with:
with:
delete_release: true
delete_release: true
tag_name: ${{ env.VERSION }}
tag_name: ${{ env.VERSION }}
env:
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Create relase body
run: |
touch body.md
if [[ $VERSION == *"SNAPSHOT"* ]]; then
echo "**These are snapshot builds. Untested and not recommended for daily use.**" >> body.md
fi
if [[ $VERSION == *"EA"* ]]; then
echo "PRE_RELEASE=true" >> $GITHUB_ENV
else
echo "PRE_RELEASE=false" >> $GITHUB_ENV
fi
- name: Release nightly build
- name: Release nightly build
uses: ncipollo/release-action@v1.8.6
uses: ncipollo/release-action@v1.8.6
with:
with:
allowUpdates: true
allowUpdates: true
name: ${{ env.VERSION }}
name: ${{ env.VERSION }}
artifacts: target/install/*
artifacts: target/install/*
token: ${{ secrets.GITHUB_TOKEN }}
token: ${{ secrets.GITHUB_TOKEN }}
tag: ${{ env.VERSION }}
tag: ${{ env.VERSION }}
bodyFile: "body.md"
prerelease: ${{ env.PRE_RELEASE }}