From e7853b4e902745c12782451faedb35180620c43c Mon Sep 17 00:00:00 2001 From: jem Date: Thu, 2 Jul 2020 12:22:13 +0200 Subject: [PATCH] test for having dev & prod release --- .../{release.yml => release-dev.yml} | 14 +------ .github/workflows/release-prod.yml | 40 +++++++++++++++++++ 2 files changed, 41 insertions(+), 13 deletions(-) rename .github/workflows/{release.yml => release-dev.yml} (56%) create mode 100644 .github/workflows/release-prod.yml diff --git a/.github/workflows/release.yml b/.github/workflows/release-dev.yml similarity index 56% rename from .github/workflows/release.yml rename to .github/workflows/release-dev.yml index 4b893ee..0c37105 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release-dev.yml @@ -1,7 +1,7 @@ name: release dev on: push: - ignore-tags: '[0-9]+.[0-9]+.[0-9]+' + ignore-tags: '[0-9]+.[0-9]+.[0-9]' jobs: dev-release: @@ -10,18 +10,6 @@ jobs: steps: - uses: actions/checkout@v2 - - - name: Cache node modules - uses: actions/cache@v2 - env: - cache-name: cache-node-modules - with: - path: /usr/lib/python3/ - key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package.json') }} - restore-keys: | - ${{ runner.os }}-build-${{ env.cache-name }}- - ${{ runner.os }}-build- - ${{ runner.os }}- - name: Use python 3.x uses: actions/setup-python@v2 diff --git a/.github/workflows/release-prod.yml b/.github/workflows/release-prod.yml new file mode 100644 index 0000000..756afa6 --- /dev/null +++ b/.github/workflows/release-prod.yml @@ -0,0 +1,40 @@ +name: release prod +on: + push: + tags: '[0-9]+.[0-9]+.[0-9]' + +jobs: + prod-release: + name: release prod + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + + - name: Use python 3.x + uses: actions/setup-python@v2 + with: + python-version: '3.x' + + - name: install dependencies + run: | + python -m pip install --upgrade pip + pip install pybuilder ddadevops deprecation setuptools + + - name: build em + env: + TWINE_USERNAME: dda + TWINE_PASSWORD: ${{ secrets.PYPI_DDA }} + run: | + pyb publish upload + + - name: Create Release + id: create_release + uses: actions/create-release@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + tag_name: ${{ github.ref }} + release_name: Release ${{ github.ref }} + draft: false + prerelease: false