summaryrefslogtreecommitdiffhomepage
path: root/.github/workflows/release.yml
diff options
context:
space:
mode:
authoradamjanovsky2022-02-01 17:48:00 +0100
committerGitHub2022-02-01 17:48:00 +0100
commitb1c47f259a2732e02d290e3e564f9de01b857056 (patch)
tree96e83cac6518d74561d48a6d6fe9bcd8631b956b /.github/workflows/release.yml
parent9e97f290d3318b35c0932a783d291d5e881ee8fb (diff)
parent47a959cae08bb67aab3151d2fdfd85643c7ddaca (diff)
downloadsec-certs-0.0.2.tar.gz
sec-certs-0.0.2.tar.zst
sec-certs-0.0.2.zip
Merge pull request #163 from crocs-muni/adamjanovsky/release-managementv0.0.2
Adamjanovsky/release management
Diffstat (limited to '.github/workflows/release.yml')
-rw-r--r--.github/workflows/release.yml72
1 files changed, 72 insertions, 0 deletions
diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
new file mode 100644
index 00000000..eac3ad2e
--- /dev/null
+++ b/.github/workflows/release.yml
@@ -0,0 +1,72 @@
+name: Release with GitHub, PyPi, DockerHub
+
+on:
+ push:
+ branches: [master]
+ tags:
+ - "v*.*.*"
+ pull_request:
+ branches: [master]
+ tags:
+ - "v*.*.*"
+
+jobs:
+ github_release:
+ name: Release on GitHub
+ runs-on: ubuntu-latest
+ if: github.repository == 'crocs-muni/sec-certs'
+ steps:
+ - name: Checkout
+ uses: actions/checkout@v2
+ - name: Release
+ uses: softprops/action-gh-release@v1
+ with:
+ prerelease: true
+ generate_release_notes: true
+
+ pypi_release:
+ name: Release on PyPi
+ runs-on: ubuntu-latest
+ if: github.repository == 'crocs-muni/sec-certs'
+ steps:
+ - uses: actions/checkout@v2
+ - name: Set up Python
+ uses: actions/setup-python@v2
+ with:
+ python-version: "3.8"
+ - name: Install build dependencies
+ run: python -m pip install build wheel
+ - name: Build distributions
+ shell: bash -l {0}
+ run: python setup.py sdist bdist_wheel
+ - name: Publish package to PyPI
+ uses: pypa/gh-action-pypi-publish@master
+ with:
+ user: ${{ secrets.PYPI_USERNAME }}
+ password: ${{ secrets.PYPI_PASSWORD }}
+ docker:
+ name: Release on dockerhub
+ runs-on: ubuntu-latest
+ if: github.repository == 'crocs-muni/sec-certs'
+ steps:
+ - name: Set up QEMU
+ uses: docker/setup-qemu-action@v1
+ - name: Set up Docker Build
+ uses: docker/setup-buildx-action@v1
+ - name: Login to DockerHub
+ uses: docker/login-action@v1
+ with:
+ username: ${{ secrets.DOCKERHUB_USERNAME }}
+ password: ${{ secrets.DOCKERHUB_PASSWORD }}
+ - name: Extract metadata (tags, labels) for Docker
+ id: meta
+ uses: docker/metadata-action@98669ae865ea3cffbcbaa878cf57c20bbf1c6c38
+ with:
+ images: seccerts/sec-certs
+ - name: Build and push
+ id: docker_build
+ uses: docker/build-push-action@v2
+ with:
+ file: docker/Dockerfile
+ push: true
+ tags: ${{ steps.meta.outputs.tags }}