Merge pull request #37 from SouthernCrossGaming/master #60
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
name: Nativevotes Autobuild | |
# modified from https://github.com/nosoop/NinjaBuild-SMPlugin/blob/master/contrib/github-workflow/build-on-version-tag-push.yml | |
on: | |
push: | |
branches: [ master ] | |
jobs: | |
run: | |
name: Run action | |
runs-on: ubuntu-22.04 | |
# skip build on '[ci skip]' | |
if: "!contains(github.event.head_commit.message, '[ci skip]')" | |
steps: | |
- uses: actions/checkout@v1 | |
with: | |
submodules: true | |
- name: Setup SourcePawn 1.11 Compiler | |
uses: rumblefrog/setup-sp@master | |
with: | |
version: "1.11.x" | |
- name: Compile plugins 1.11 | |
shell: bash | |
run: | | |
bash .github/nv_compile.sh | |
bash | |
- name: Setup SourcePawn 1.12 Compiler | |
uses: rumblefrog/setup-sp@master | |
with: | |
version: "1.12.x" | |
- name: Compile plugins 1.12 | |
shell: bash | |
run: | | |
bash .github/nv_compile.sh | |
bash | |
- name: Set Commit Hash | |
id: commit_info | |
run: echo "::set-output name=sha_short::$(git rev-parse --short HEAD)" | |
- name: Create Release | |
id: create_release | |
uses: actions/create-release@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
tag_name: workflow-build${{ github.run_number }} | |
release_name: Build ${{ steps.commit_info.outputs.sha_short }} | |
draft: false | |
prerelease: false | |
- name: Release | |
uses: softprops/action-gh-release@v1 | |
with: | |
tag_name: workflow-build${{ github.run_number }} | |
files: build/nativevotes* |