Skip to content

v0.37.3

v0.37.3 #84

Workflow file for this run

name: Deploy Release
on:
release:
types: [published]
jobs:
publish:
runs-on: ubuntu-latest
steps:
- name: Download Releases
uses: robinraju/[email protected]
with:
repository: "voxelum/x-minecraft-launcher"
tag: ${{ github.event.release.tag_name }}
fileName: "*"
out-file-path: build
- name: Upload to Azure
uses: ci010/upload-blob-to-azure@master
env:
AZURE_ACCOUNT_KEY: ${{ secrets.AZURE_ACCOUNT_KEY }}
with:
account: xmcl
container: releases
directory: ./build
- name: Update Web Page
uses: benc-uk/workflow-dispatch@v1
with:
workflow: Deploy
token: ${{ secrets.PAT_GITHUB_TOKEN }}
ref: 'master'
repo: 'voxelum/xmcl-page'
- name: Create release version file
run: |
mkdir releases
echo ${{ github.event.release.tag_name }} > ./releases/VERSION
cat << EOF > ./releases/latest_version.json
${{ toJSON(github.event.release) }}
EOF
- name: Upload release version file to Azure
uses: ci010/upload-blob-to-azure@master
env:
AZURE_ACCOUNT_KEY: ${{ secrets.AZURE_ACCOUNT_KEY }}
with:
account: xmcl
container: releases
directory: ./releases
notify:
needs:
- publish
name: Notify Kook and discord
runs-on: ubuntu-latest
steps:
- name: Publish Release Notification
uses: voxelum/discord-kook-notify-action@main
with:
version: ${{ github.event.release.tag_name }}
token: ${{ secrets.KOOK_BOT_TOKEN }}
discord: ${{ secrets.DISCORD_WEBHOOK }}
update-winget:
needs:
- publish
name: Upload To winget
runs-on: windows-2019
defaults:
run:
shell: powershell
steps:
- name: Download Releases
uses: robinraju/[email protected]
with:
repository: "voxelum/x-minecraft-launcher"
tag: ${{ github.event.release.tag_name }}
fileName: "version"
- uses: actions/github-script@v6
name: Get Release Version
id: version
with:
result-encoding: string
script: |
return '${{ github.event.release.tag_name }}'.substring(1);
- name: Update version env
run: |
echo "VERSION=$(cat ./version)" >> $env:GITHUB_ENV
- name: Create winget PR
run: |
iwr https://aka.ms/wingetcreate/latest -OutFile wingetcreate.exe
.\wingetcreate.exe update CI010.XMinecraftLauncher -u $Env:URL -v $Env:VERSION -t $Env:TOKEN --submit
env:
TOKEN: ${{ secrets.PAT_GITHUB_TOKEN }}
URL: ${{ format('https://xmcl-release-ms.azureedge.net/releases/xmcl-{0}.appx', steps.version.outputs.result) }}