From b666f9dc52dc31042fd10fb9ebaf933a08938966 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Pedersen?= Date: Tue, 3 Sep 2024 08:59:29 +0200 Subject: [PATCH] Implemented release CI --- .github/workflows/release.yml | 44 +++++++++++++++++++++++++++++++++++ 1 file changed, 44 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..40970e4 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,44 @@ +name: Create Release + +on: + workflow_dispatch: + push: + tags: + - '*' + release: + types: [ published ] + +jobs: + build: + runs-on: ubuntu-20.04 + steps: + - name: Checkout repo + uses: actions/checkout@v1 + + - name: Set up Python 3.6 + uses: actions/setup-python@v2 + with: + python-version: '3.6' + + - name: Install dependencies + run: pip install wheel setuptools + + - name: Build package + run: python setup.py bdist_wheel + + - name: Upload Python wheel + uses: actions/upload-artifact@v3 + with: + name: "Python wheel" + path: ./dist/* + if-no-files-found: error + + - name: Upload APK to release + if: ${{ github.event_name == 'release' }} + uses: svenstaro/upload-release-action@v2 + with: + repo_token: ${{ secrets.CI_TOKEN }} + file: ./dist/vsi2tif-*.whl + file_glob: true + tag: ${{ github.ref }} + overwrite: true