Merge pull request #11 from MoskitoSantana/dev #37
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: HEMTT | |
on: | |
push: | |
tags: | |
"v*.*.*.*" | |
branches: | |
- main | |
pull_request: | |
jobs: | |
validate: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout the source code | |
uses: actions/checkout@master | |
- name: Check for BOM | |
uses: arma-actions/bom-check@master | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout the source code | |
uses: actions/checkout@master | |
- name: Bump Version | |
id: bump_version | |
run: python3 python_code/version_bumper.py increment_patch push_commit | |
- name: Setup HEMTT | |
uses: arma-actions/hemtt@v1 | |
- name: Run HEMTT build | |
run: hemtt release | |
- name: Upload Release | |
id: upload_release | |
uses: actions/upload-artifact@v4 | |
with: | |
name: "mawii" | |
path: ".hemttout/release/*" | |
include-hidden-files: true # Because .hemttout is a hidden directory | |
outputs: | |
VERSION: ${{ steps.bump_version.outputs.VERSION }} | |
ARTIFACT_ID: ${{ steps.upload_release.outputs.artifact-id}} | |
ARTIFACT_URL: ${{ steps.upload_release.outputs.artifact-url}} | |
release: | |
name: Release | |
runs-on: ubuntu-latest | |
needs: build | |
steps: | |
- name: Download Artifact | |
uses: actions/download-artifact@v4 | |
with: | |
name: "mawii" | |
- name: List Dir | |
run: ls -R | |
- name: Create GitHub Release | |
id: create-new-release | |
uses: actions/create-release@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
release_name: mawii_v${{ needs.build.outputs.VERSION }} | |
tag_name: ${{ needs.build.outputs.VERSION }} | |
- name: Upload Release Asset | |
id: upload-release-asset | |
uses: actions/upload-release-asset@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
upload_url: ${{ steps.create-new-release.outputs.upload_url }} | |
asset_path: ./mawii.zip | |
asset_name: mawii_v${{ needs.build.outputs.VERSION }}.zip | |
asset_content_type: application/zip |