mirror of
https://github.com/edgegamers/poor-sharptimer.git
synced 2025-12-05 20:40:25 -08:00
Release
This commit is contained in:
@@ -49,23 +49,52 @@ jobs:
|
||||
mkdir -p publish/addons/counterstrikesharp/plugins/SharpTimer/
|
||||
find ./publish -mindepth 1 -maxdepth 1 ! -name 'cfg' ! -name 'gamedata' -exec mv {} publish/addons/counterstrikesharp/plugins/SharpTimer/ \;
|
||||
mv gamedata/ ./publish/addons/counterstrikesharp/
|
||||
|
||||
|
||||
- name: Upload artifact
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: SharpTimer
|
||||
path: publish/*
|
||||
if-no-files-found: error
|
||||
|
||||
- name: Set version tag and zip file name
|
||||
id: version
|
||||
run: |
|
||||
VERSION="v1.0.${{ github.run_number }}"
|
||||
if [[ $GITHUB_REF == 'refs/heads/dev' ]]; then
|
||||
TAG="Prerelease $VERSION"
|
||||
else
|
||||
TAG="$VERSION"
|
||||
fi
|
||||
ZIP_NAME="SharpTimer_${VERSION}.zip"
|
||||
echo "TAG=$TAG" >> $GITHUB_ENV
|
||||
echo "ZIP_NAME=$ZIP_NAME" >> $GITHUB_ENV
|
||||
|
||||
- name: Zip published files
|
||||
run: |
|
||||
cd publish
|
||||
zip -r ${{ env.ZIP_NAME }} .
|
||||
|
||||
- name: Create GitHub Release
|
||||
uses: ncipollo/release-action@v1.16.0
|
||||
with:
|
||||
name: ${{ env.TAG }}
|
||||
artifacts: publish/${{ env.ZIP_NAME }}
|
||||
prerelease: ${{ contains(github.ref, 'dev') }}
|
||||
tag: v1.0.${{ github.run_number }}
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
post_webhook:
|
||||
needs: build
|
||||
runs-on: ubuntu-latest
|
||||
if: github.ref == 'refs/heads/dev'
|
||||
|
||||
steps:
|
||||
- name: POST Webhook
|
||||
run: |
|
||||
curl -X POST \
|
||||
--fail \
|
||||
-F token=${{ secrets.GITLAB_SECRET_TOKEN }} \
|
||||
-F ref=dev \
|
||||
https://gitlab.edgegamers.io/api/v4/projects/2683/trigger/pipeline
|
||||
- name: POST Webhook
|
||||
run: |
|
||||
curl -X POST \
|
||||
--fail \
|
||||
-F token=${{ secrets.GITLAB_SECRET_TOKEN }} \
|
||||
-F ref=dev \
|
||||
https://gitlab.edgegamers.io/api/v4/projects/2683/trigger/pipeline
|
||||
@@ -16,7 +16,7 @@
|
||||
<PackageReference Include="System.Data.SQLite" Version="1.0.118"/>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Content Include=".github\workflows\build.yml"/>
|
||||
<Content Include=".github\workflows\nightly.yml" />
|
||||
<Content Include="lang\**\*">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
<Link>lang\%(RecursiveDir)%(Filename)%(Extension)</Link>
|
||||
|
||||
Reference in New Issue
Block a user