-
Notifications
You must be signed in to change notification settings - Fork 42
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #149 from Maxximou5/v2
Master pull for v2 before v3
- Loading branch information
Showing
7 changed files
with
143 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
name: Compile Plugin | ||
|
||
on: [push] | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
|
||
strategy: | ||
matrix: | ||
sm-version: [ '1.11.x' ] | ||
|
||
name: SM version ${{ matrix.sm-version }} | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Setup SourcePawn Compiler | ||
id: setup | ||
uses: rumblefrog/setup-sp@master | ||
with: | ||
version: ${{ matrix.sm-version }} | ||
|
||
- name: Create plugins directory | ||
run: mkdir plugins | ||
|
||
- run: spcomp -i scripting/include scripting/deathmatch.sp -o plugins/deathmatch.smx | ||
|
||
- name: Prepare files for artifact | ||
run: | | ||
mkdir artifact | ||
mv ./configs ./artifact | ||
mv ./plugins ./artifact/ | ||
mv ./scripting ./artifact/ | ||
mv ./translations ./artifact | ||
mv ./LICENSE ./artifact/ | ||
mv ./CHANGELOG.md ./artifact | ||
mv ./README.md ./artifact | ||
- name: Upload compiled plugin | ||
uses: actions/upload-artifact@v1 | ||
with: | ||
name: Compiled plugin with SM ${{ steps.setup.outputs.version }} | ||
path: artifact |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,94 @@ | ||
name: Publish release | ||
|
||
on: | ||
push: | ||
tags: | ||
- 'v*' | ||
|
||
jobs: | ||
release: | ||
name: Create GitHub release | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Create Release | ||
id: create_release | ||
uses: actions/create-release@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
tag_name: ${{ github.ref }} | ||
release_name: Release ${{ github.ref }} | ||
draft: false | ||
prerelease: false | ||
|
||
- name: Output Release URL File | ||
run: echo "${{ steps.create_release.outputs.upload_url }}" > release_url.txt | ||
|
||
- name: Save Release URL File for publish | ||
uses: actions/upload-artifact@v1 | ||
with: | ||
name: release_url | ||
path: release_url.txt | ||
|
||
compile: | ||
runs-on: ubuntu-latest | ||
needs: release | ||
strategy: | ||
matrix: | ||
sm-version: [ '1.11.x' ] | ||
|
||
name: SM version ${{ matrix.sm-version }} | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Setup SourcePawn Compiler | ||
id: setup | ||
uses: rumblefrog/setup-sp@master | ||
with: | ||
version: ${{ matrix.sm-version }} | ||
|
||
- name: Create plugins directory | ||
run: mkdir -p plugins | ||
|
||
- run: spcomp -i ./scripting/include ./scripting/deathmatch.sp -o ./plugins/deathmatch.smx | ||
|
||
- name: Prepare files for artifact | ||
run: | | ||
mkdir artifact | ||
mv ./configs ./artifact | ||
mv ./plugins ./artifact/ | ||
mv ./scripting ./artifact/ | ||
mv ./translations ./artifact | ||
mv ./LICENSE ./artifact/ | ||
mv ./CHANGELOG.md ./artifact | ||
mv ./README.md ./artifact | ||
- name: Zip plugin | ||
run : | | ||
cd artifact | ||
zip -r deathmatch * | ||
cd .. | ||
mv artifact/deathmatch.zip . | ||
- name: Load Release URL File from release job | ||
uses: actions/download-artifact@v1 | ||
with: | ||
name: release_url | ||
|
||
- name: Get Release File Name & Upload URL | ||
id: release_url | ||
run: | | ||
value=`cat release_url/release_url.txt` | ||
echo ::set-output name=upload_url::$value | ||
- name: Upload Release files | ||
id: upload-release-files | ||
uses: actions/upload-release-asset@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
upload_url: ${{ steps.release_url.outputs.upload_url }} | ||
asset_path: ./deathmatch.zip | ||
asset_name: deathmatch-sm${{ steps.setup.outputs.version }}.zip | ||
asset_content_type: application/zip |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters