v0.44.16 #136
Workflow file for this run
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: 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) }} | |
# publish-msstore: | |
# runs-on: windows-latest | |
# needs: | |
# - publish | |
# steps: | |
# - name: Download Releases | |
# uses: robinraju/[email protected] | |
# with: | |
# repository: "voxelum/x-minecraft-launcher" | |
# tag: ${{ github.event.release.tag_name }} | |
# fileName: "xmcl-*.appx" | |
# out-file-path: build | |
# - name: Steup msstore cli | |
# uses: microsoft/setup-msstore-cli@main | |
# - name: Configure msstore cli | |
# run: | | |
# msstore reconfigure --tenantId ${{ secrets.AZURE_AD_TENANT_ID }} --clientSecret ${{ secrets.AZURE_AD_CLIENT_SECRET }} --clientId ${{ secrets.AZURE_AD_CLIENT_ID }} --sellerId ${{ secrets.SELLER_ID }} | |
# - name: Publish appx to msstore | |
# run: | | |
# msstore publish -v --appId 9MXJWHXTP4B9 --inputDirectory xmcl-electron-app/build/output |