Skip to content

missing publish name in gha #6

missing publish name in gha

missing publish name in gha #6

Workflow file for this run

name: Build TS3AudioBot
on:
push:
branches: [ "master", "develop" ]
jobs:
build_tsab:
runs-on: ubuntu-latest
outputs:
tsab_version: ${{ steps.get_version.outputs.tsab_version }}
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
submodules: 'recursive'
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: 8.0.x
- name: Restore dependencies
run: dotnet restore
- name: Test
run: dotnet test -c Release --verbosity normal
- name: Build
run: dotnet publish TS3AudioBot -c Release -o publish
- name: Get Version
id: get_version
run: |
cd TS3AudioBot
TSABVERSION=$(dotnet publish/TS3AudioBot.dll -V | grep -oP 'Version: \K.*')
echo "tsab_version=$TSABVERSION" >> $GITHUB_ENV
build_frontend:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: 22
- name: Install yarn
run: npm install -g yarn
- name: Install dependencies
run: |
cd WebInterface
yarn install --frozen-lockfile
- name: Build
run: |
cd WebInterface
yarn run build
- name: Archive
uses: actions/upload-artifact@v4
with:
name: webinterface
path: WebInterface/dist
publish:
needs: [ build_tsab, build_frontend ]
runs-on: ubuntu-latest
strategy:
matrix:
rid: [ "linux-x64", "linux-arm", "linux-arm64", "win-x64" ]
concurrency:
group: publish_bins
cancel-in-progress: false
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
submodules: 'recursive'
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: 8.0.x
- name: Publish
run: |
dotnet publish TS3AudioBot/TS3AudioBot.csproj \
-c Release \
--framework net8.0 \
--self-contained \
--runtime ${{ matrix.rid }} \
-p:PublishSingleFile=true,IncludeNativeLibrariesForSelfExtract=true \
-o publish
- name: Fetch WebInterface
uses: actions/download-artifact@v4
with:
name: webinterface
path: publish/WebInterface
- name: Archive
uses: actions/upload-artifact@v4
with:
name: ts3audiobot-${{ matrix.rid }}
path: publish
- name: Get Version
id: get_version
run: |
cd publish
TSABVERSION=${{ needs.build_tsab.outputs.tsab_version }}
TSABBRANCH="${{ github.head_ref || github.ref_name }}"
TASBBUILDSUFFIX=$(echo ${{ matrix.rid }} | tr '-' '_')
echo "TSABVERSION=$TSABVERSION" >> $GITHUB_ENV
echo "TSABBRANCH=$TSABBRANCH" >> $GITHUB_ENV
echo "TASBBUILD=${TSABBRANCH}_${TASBBUILDSUFFIX}" >> $GITHUB_ENV
- name: Upload to Splamy.de
if: startsWith(matrix.rid, 'win-')
run: |
cd publish
zip -r TS3AudioBot.zip .
curl \
-X PUT \
-H "Content-Type: application/zip" \
-H "Authorization: ${{ secrets.UPLOAD_TOKEN }}" \
--data-binary @TS3AudioBot.zip \
"https://splamy.de/api/nightly/projects/ts3ab/${TASBBUILD}?filename=TS3AudioBot.zip&commit=${{ github.sha }}&version=${TSABVERSION}"
- name: Upload to Splamy.de
if: startsWith(matrix.rid, 'linux-')
run: |
cd publish
chmod 755 TS3AudioBot
tar -czf TS3AudioBot.tar.gz .
curl \
-X PUT \
-H "Content-Type: application/gzip" \
-H "Authorization: ${{ secrets.UPLOAD_TOKEN }}" \
--data-binary @TS3AudioBot.tar.gz \
"https://splamy.de/api/nightly/projects/ts3ab/${TASBBUILD}?filename=TS3AudioBot.tar.gz&commit=${{ github.sha }}&version=$TSABVERSION"