Yeet
This commit is contained in:
@@ -9,6 +9,7 @@ env:
|
|||||||
DOTNET_VERSION: |
|
DOTNET_VERSION: |
|
||||||
10.x.x
|
10.x.x
|
||||||
9.x.x
|
9.x.x
|
||||||
|
DOTNET_CLI_TELEMETRY_OPTOUT: true
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
tag-and-release:
|
tag-and-release:
|
||||||
@@ -32,16 +33,14 @@ jobs:
|
|||||||
|
|
||||||
- name: Download Dalamud
|
- name: Download Dalamud
|
||||||
run: |
|
run: |
|
||||||
cd /
|
mkdir -p ~/.xlcore/dalamud/Hooks/dev
|
||||||
mkdir -p root/.xlcore/dalamud/Hooks/dev
|
|
||||||
curl -O https://goatcorp.github.io/dalamud-distrib/stg/latest.zip
|
curl -O https://goatcorp.github.io/dalamud-distrib/stg/latest.zip
|
||||||
unzip latest.zip -d /root/.xlcore/dalamud/Hooks/dev
|
unzip latest.zip -d ~/.xlcore/dalamud/Hooks/dev
|
||||||
|
|
||||||
- name: Lets Build Lightless!
|
- name: Lets Build Lightless!
|
||||||
run: |
|
run: |
|
||||||
dotnet restore
|
dotnet publish --configuration Release
|
||||||
dotnet build --configuration Release --no-restore
|
mv LightlessSync/bin/x64/Release/LightlessSync/latest.zip LightlessClient.zip
|
||||||
dotnet publish --configuration Release --no-build
|
|
||||||
|
|
||||||
- name: Get version
|
- name: Get version
|
||||||
id: package_version
|
id: package_version
|
||||||
@@ -53,19 +52,6 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
echo "Version: ${{ steps.package_version.outputs.version }}"
|
echo "Version: ${{ steps.package_version.outputs.version }}"
|
||||||
|
|
||||||
- name: Prepare Lightless Client
|
|
||||||
run: |
|
|
||||||
PUBLISH_PATH="/workspace/Lightless-Sync/LightlessClient/LightlessSync/bin/x64/Release/publish/"
|
|
||||||
if [ -d "$PUBLISH_PATH" ]; then
|
|
||||||
rm -rf "$PUBLISH_PATH"
|
|
||||||
echo "Removed $PUBLISH_PATH"
|
|
||||||
else
|
|
||||||
echo "$PUBLISH_PATH does not exist, nothing to remove."
|
|
||||||
fi
|
|
||||||
|
|
||||||
mkdir -p output
|
|
||||||
(cd /workspace/Lightless-Sync/LightlessClient/LightlessSync/bin/x64/Release/ && zip -r $OLDPWD/output/LightlessClient.zip *)
|
|
||||||
|
|
||||||
- name: Create Git tag if not exists (master)
|
- name: Create Git tag if not exists (master)
|
||||||
if: github.ref == 'refs/heads/master'
|
if: github.ref == 'refs/heads/master'
|
||||||
run: |
|
run: |
|
||||||
@@ -163,13 +149,6 @@ jobs:
|
|||||||
echo "release_id=$release_id" >> $GITHUB_OUTPUT || echo "::set-output name=release_id::$release_id"
|
echo "release_id=$release_id" >> $GITHUB_OUTPUT || echo "::set-output name=release_id::$release_id"
|
||||||
echo "RELEASE_ID=$release_id" >> $GITHUB_ENV
|
echo "RELEASE_ID=$release_id" >> $GITHUB_ENV
|
||||||
|
|
||||||
- name: Check asset exists
|
|
||||||
run: |
|
|
||||||
if [ ! -f output/LightlessClient.zip ]; then
|
|
||||||
echo "output/LightlessClient.zip does not exist!"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
- name: Upload Assets to release
|
- name: Upload Assets to release
|
||||||
env:
|
env:
|
||||||
RELEASE_ID: ${{ env.RELEASE_ID }}
|
RELEASE_ID: ${{ env.RELEASE_ID }}
|
||||||
@@ -177,7 +156,7 @@ jobs:
|
|||||||
echo "Uploading to release ID: $RELEASE_ID"
|
echo "Uploading to release ID: $RELEASE_ID"
|
||||||
curl --fail-with-body -s -X POST \
|
curl --fail-with-body -s -X POST \
|
||||||
-H "Authorization: token ${{ secrets.GITEA_TOKEN }}" \
|
-H "Authorization: token ${{ secrets.GITEA_TOKEN }}" \
|
||||||
-F "attachment=@output/LightlessClient.zip" \
|
-F "attachment=LightlessClient.zip" \
|
||||||
"https://git.lightless-sync.org/api/v1/repos/${GITHUB_REPOSITORY}/releases/$RELEASE_ID/assets"
|
"https://git.lightless-sync.org/api/v1/repos/${GITHUB_REPOSITORY}/releases/$RELEASE_ID/assets"
|
||||||
|
|
||||||
- name: Clone plugin hosting repo
|
- name: Clone plugin hosting repo
|
||||||
@@ -282,8 +261,8 @@ jobs:
|
|||||||
- name: Commit and push to LightlessSync
|
- name: Commit and push to LightlessSync
|
||||||
run: |
|
run: |
|
||||||
cd LightlessSyncRepo/LightlessSync
|
cd LightlessSyncRepo/LightlessSync
|
||||||
git config user.name "github-actions"
|
git config user.name "Gitea-Automation"
|
||||||
git config user.email "github-actions@github.com"
|
git config user.email "aaa@aaaaaaa.aaa"
|
||||||
git add .
|
git add .
|
||||||
git diff-index --quiet HEAD || git commit -m "Update ${{ env.PLUGIN_NAME }} to ${{ steps.package_version.outputs.version }}"
|
git diff-index --quiet HEAD || git commit -m "Update ${{ env.PLUGIN_NAME }} to ${{ steps.package_version.outputs.version }}"
|
||||||
git push https://x-access-token:${{ secrets.AUTOMATION_TOKEN }}@git.lightless-sync.org/${{ gitea.repository_owner }}/LightlessSync.git HEAD:main
|
git push https://x-access-token:${{ secrets.AUTOMATION_TOKEN }}@git.lightless-sync.org/${{ gitea.repository_owner }}/LightlessSync.git HEAD:main
|
||||||
|
|||||||
Reference in New Issue
Block a user