diff --git a/.gitea/workflows/release.yaml b/.gitea/workflows/release.yaml new file mode 100644 index 0000000..cc0bdf9 --- /dev/null +++ b/.gitea/workflows/release.yaml @@ -0,0 +1,34 @@ +name: Build and Release + +on: + push: + branches: + - main + +jobs: + build: + name: Build Windows Exe + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v3 + + - name: Build with PyInstaller (Wine) + uses: docker://cdrx/pyinstaller-windows:python3 + with: + args: "python -m pip install -r requirements.txt && pyinstaller --onefile --clean --name wif2ansible run.py" + + - name: Generate Version Tag + id: version + run: echo "TAG=v$(date +'%Y.%m.%d').${{ gitea.run_number }}" >> $GITHUB_OUTPUT + + - name: Create Release + uses: softprops/action-gh-release@v1 + with: + tag_name: ${{ steps.version.outputs.TAG }} + name: Release ${{ steps.version.outputs.TAG }} + files: dist/windows/wif2ansible.exe + draft: false + prerelease: false + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}