diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..bbfc48f --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,42 @@ +name: Build Executable + +on: + push: + branches: [ "main" ] + pull_request: + branches: [ "main" ] + workflow_dispatch: + inputs: + tag: + description: Release git tag + type: string + required: true + +env: + CARGO_TERM_COLOR: always + +jobs: + build: + runs-on: macos-13 + permissions: + contents: write + packages: write + pull-requests: write + repository-projects: write + steps: + - uses: actions/checkout@v4 + - name: Build + run: cargo build --verbose + - name: Rename + run: mv target/amdhelper-tui target/amdhelper + - name: Publish release + if: ${{ github.event_name == 'workflow_dispatch' }} + uses: ncipollo/release-action@v1 + with: + artifacts: ./target/amdhelper + tag: ${{ inputs.tag }} + name: AMDHelper ${{ inputs.tag }} + allowUpdates: true + artifactErrorsFailBuild: false + prerelease: true + token: ${{ secrets.GITHUB_TOKEN }}