Change publish-release.yaml
This commit is contained in:
parent
d1cfc01cba
commit
55186dc6b7
@ -8,28 +8,33 @@ on:
|
|||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v4
|
|
||||||
|
|
||||||
- name: Setup dotnet 8.x
|
steps:
|
||||||
|
- name: Checkout code
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Setup .NET 8.x
|
||||||
uses: actions/setup-dotnet@v3
|
uses: actions/setup-dotnet@v3
|
||||||
with:
|
with:
|
||||||
dotnet-version: 8.x
|
dotnet-version: 8.x
|
||||||
|
|
||||||
- name: Display dotnet version
|
- name: Show .NET version
|
||||||
run: dotnet --version
|
run: dotnet --version
|
||||||
|
|
||||||
- name: Extract version
|
- name: Extract version
|
||||||
id: version
|
id: version
|
||||||
run: |
|
run: |
|
||||||
VERSION="${GITHUB_REF_NAME#OFDLV}"
|
VERSION="${GITEA_REF_NAME#OFDLV}"
|
||||||
echo "Version: $VERSION"
|
echo "Version: $VERSION"
|
||||||
echo "version=$VERSION" >> "$GITHUB_OUTPUT"
|
echo "version=$VERSION" >> "$GITEA_OUTPUT"
|
||||||
|
|
||||||
- name: Run build
|
- name: Build for Windows and Linux
|
||||||
run: |
|
run: |
|
||||||
dotnet publish -p:Version=${{ steps.version.outputs.version }} -p:WarningLevel=0 -c Release -r win-x86 --self-contained true -p:PublishSingleFile=true -o outwin
|
dotnet publish -p:Version=${{ steps.version.outputs.version }} -p:WarningLevel=0 -c Release -r win-x86 --self-contained true -p:PublishSingleFile=true -o outwin
|
||||||
dotnet publish -p:Version=${{ steps.version.outputs.version }} -p:WarningLevel=0 -c Release -r linux-x64 --self-contained true -p:PublishSingleFile=true -o outlin
|
dotnet publish -p:Version=${{ steps.version.outputs.version }} -p:WarningLevel=0 -c Release -r linux-x64 --self-contained true -p:PublishSingleFile=true -o outlin
|
||||||
|
|
||||||
|
- name: Copy and patch extra files
|
||||||
|
run: |
|
||||||
cp ./OF\ DL/rules.json outwin/
|
cp ./OF\ DL/rules.json outwin/
|
||||||
chmod +x ./outlin/OF\ DL
|
chmod +x ./outlin/OF\ DL
|
||||||
cd outwin
|
cd outwin
|
||||||
@ -42,23 +47,22 @@ jobs:
|
|||||||
zip ../OFDLV${{ steps.version.outputs.version }}.zip OF\ DL.exe e_sqlite3.dll rules.json config.conf cdm ffmpeg.exe LICENSE.ffmpeg
|
zip ../OFDLV${{ steps.version.outputs.version }}.zip OF\ DL.exe e_sqlite3.dll rules.json config.conf cdm ffmpeg.exe LICENSE.ffmpeg
|
||||||
cd ..
|
cd ..
|
||||||
|
|
||||||
- name: Create release
|
- name: Create Gitea release
|
||||||
uses: actions/create-release@v1
|
uses: https://gitea.com/actions/create-release@v1
|
||||||
id: create_release
|
|
||||||
with:
|
with:
|
||||||
|
tag_name: ${{ gitea.ref }}
|
||||||
|
release_name: ${{ steps.version.outputs.version }}
|
||||||
draft: true
|
draft: true
|
||||||
prerelease: false
|
prerelease: false
|
||||||
release_name: ${{ steps.version.outputs.version }}
|
|
||||||
tag_name: ${{ github.ref }}
|
|
||||||
env:
|
env:
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GITEA_TOKEN: ${{ secrets.GITEA_TOKEN }}
|
||||||
|
|
||||||
- name: Upload Windows zip
|
- name: Upload release asset
|
||||||
uses: actions/upload-release-asset@v1
|
uses: https://gitea.com/actions/upload-release-asset@v1
|
||||||
with:
|
with:
|
||||||
upload_url: ${{ steps.create_release.outputs.upload_url }}
|
upload_url: ${{ steps.create-release.outputs.upload_url }}
|
||||||
asset_path: ./OFDLV${{ steps.version.outputs.version }}.zip
|
asset_path: ./OFDLV${{ steps.version.outputs.version }}.zip
|
||||||
asset_name: OFDLV${{ steps.version.outputs.version }}.zip
|
asset_name: OFDLV${{ steps.version.outputs.version }}.zip
|
||||||
asset_content_type: application/zip
|
asset_content_type: application/zip
|
||||||
env:
|
env:
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GITEA_TOKEN: ${{ secrets.GITEA_TOKEN }}
|
Loading…
x
Reference in New Issue
Block a user