Skip to content

添加高级编辑,加入插入函数,原始数据 #32

添加高级编辑,加入插入函数,原始数据

添加高级编辑,加入插入函数,原始数据 #32

name: Publish
on:
workflow_dispatch:
push:
branches: ["master"]
jobs:
time:
runs-on: ubuntu-latest
outputs:
v: ${{ steps.date.outputs.time }}
y: ${{ steps.date.outputs.y }}
md: ${{ steps.date.outputs.md }}
hm: ${{ steps.date.outputs.hm }}
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Time
id: date
run: |
echo "::set-output name=time::$(date +'%Y.%m.%d.%H.%M')"
echo "::set-output name=y::$(date +'%Y')"
echo "::set-output name=md::$(date +'%m%d')"
echo "::set-output name=hm::$(date +'%H%M')"
- name: EchoTime
run: |
echo "The current time is: ${{ steps.date.outputs.time }}"
win:
runs-on: windows-latest
needs: time
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Dependency-InnoSetup
uses: ConorMacBride/install-package@v1
with:
choco: innosetup
- name: Chinesize-InnoSetup
run: |
Copy-Item "./Round.NET.AvaloniaApp.EncodeCalculator/Public/Default.isl" "C:\Program Files (x86)\Inno Setup 6\Default.isl" -Force
- name: Dependency-Pupnet
run: |
dotnet tool install -g KuiperZone.PupNet
- name: Time
id: date
run: |
echo "${{ needs.time.outputs.v }}" > ./Round.NET.AvaloniaApp.EncodeCalculator/Public/DateTime.txt
echo "Version is ${{ needs.time.outputs.v }}"
shell: bash
- name: Build
run: |
cd ./Round.NET.AvaloniaApp.EncodeCalculator.Desktop
pupnet -r win-x64 -k setup -y -o Round.NET.AvaloniaApp.EncodeCalculator.Desktop.win.x64.installer.exe --app-version ${{ needs.time.outputs.y }}.${{ needs.time.outputs.md }}.${{ needs.time.outputs.hm }}
pupnet -r win-x86 -k setup -y -o Round.NET.AvaloniaApp.EncodeCalculator.Desktop.win.x86.installer.exe --app-version ${{ needs.time.outputs.y }}.${{ needs.time.outputs.md }}.${{ needs.time.outputs.hm }}
pupnet -r win-arm64 -k setup -y -o Round.NET.AvaloniaApp.EncodeCalculator.Desktop.win.arm64.installer.exe --app-version ${{ needs.time.outputs.y }}.${{ needs.time.outputs.md }}.${{ needs.time.outputs.hm }}
- name: UploadArtifacts
uses: actions/upload-artifact@v4
with:
name: win-artifacts
path: |
./Round.NET.AvaloniaApp.EncodeCalculator.Desktop/Deploy/OUT/*
publish:
needs: [win, time]
runs-on: ubuntu-latest
steps:
- name: Time
id: gdate
run: |
echo "date=$(date +'%Y-%m-%d.%H-%M-%S')" >> $GITHUB_OUTPUT
echo "title=$(date +'%Y.%m.%d.%H.%M')" >> $GITHUB_OUTPUT
- name: Download-WindowsArtifacts
uses: actions/download-artifact@v4
with:
name: win-artifacts
path: ./Round.NET.AvaloniaApp.EncodeCalculator/Release/
- name: List Files
run: |
ls -la ./Round.NET.AvaloniaApp.EncodeCalculator/Release/
- name: Publish Release
uses: marvinpinto/action-automatic-releases@latest
with:
repo_token: "${{ secrets.TOKEN }}"
title: "v${{ needs.time.outputs.v }}"
automatic_release_tag: "AutoPublish-${{ steps.gdate.outputs.date }}"
prerelease: false
files: |
Round.NET.AvaloniaApp.EncodeCalculator/Release/*.exe
Round.NET.AvaloniaApp.EncodeCalculator/Release/bin/Release/net8.0/*.zip