From bfc0d9cb873396152cc75c716bfedbdd8a59bf1f Mon Sep 17 00:00:00 2001 From: Opliko Date: Sun, 22 Oct 2023 21:29:44 +0200 Subject: [PATCH] ci: add release CI --- .github/workflows/release.yml | 61 +++++++++++++++++++++++++++++++++++ 1 file changed, 61 insertions(+) create mode 100644 .github/workflows/release.yml diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..de102f7 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,61 @@ +on: + push: + branches: + - main + +permissions: + contents: write + pull-requests: write + +name: release-please + +jobs: + test-build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - name: Install poetry + run: pipx install poetry + - name: Set up Python + uses: actions/setup-python@v4 + with: + python-version: "3.10" + cache: "poetry" + - name: Install dependencies + run: poetry install + - name: build + run: poetry run ./build.py + release-please: + runs-on: ubuntu-latest + outputs: + release-url: ${{ steps.release.outputs.release_url }} + upload-url: ${{ steps.release.outputs.upload_url }} + release-created: ${{ steps.release.outputs.release_created }} + steps: + - uses: google-github-actions/release-please-action@v3 + id: release + with: + release-type: python + package-name: "mn2" + build: + if: ${{ needs.release-please.outputs.release-created }} + name: Build + runs-on: ubuntu-latest + needs: release-please + steps: + - uses: actions/checkout@v3 + - name: Install poetry + run: pipx install poetry + - name: Set up Python + uses: actions/setup-python@v4 + with: + python-version: "3.10" + cache: "poetry" + - name: Install dependencies + run: poetry install + - name: build + run: poetry run ./build.py + - uses: shogo82148/actions-upload-release-asset@v1 + with: + upload_url: ${{ needs.release-please.outputs.upload-url }} + asset_path: dist/mn2 \ No newline at end of file -- knotmirror 0.0.1