-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
0190d11
commit 0cbcc49
Showing
3 changed files
with
134 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
name: Publish to DockerHub | ||
on: | ||
release: | ||
types: [ published ] | ||
workflow_dispatch: {} | ||
jobs: | ||
build-and-publish: | ||
name: Build image and Publish to DockerHub | ||
runs-on: ubuntu-latest | ||
steps: | ||
# This action checks-out your repository under $GITHUB_WORKSPACE, so your workflow can access it. | ||
- name: Checkout | ||
id: checkout | ||
uses: actions/checkout@v3 | ||
- name: Setup QEMU | ||
# GitHub Action to install QEMU static binaries. | ||
id: setup-qemu | ||
uses: docker/setup-qemu-action@v3 | ||
# This action will create and boot a builder that can be used in the following steps of your workflow if you're using Buildx or the build-push action. | ||
- name: Setup Docker Buildx | ||
id: setup-docker-buildx | ||
uses: docker/setup-buildx-action@v3 | ||
# GitHub Action to login against a Docker registry. | ||
- name: Login to Docker Hub | ||
id: login-to-docker-hub | ||
uses: docker/login-action@v3 | ||
with: | ||
username: ${{ secrets.DOCKERHUB_USERNAME }} | ||
password: ${{ secrets.DOCKERHUB_TOKEN }} | ||
# GitHub Action to build and push Docker images with Buildx with full support of the features provided by Moby BuildKit builder toolkit. | ||
- name: Build and Push | ||
id: build-and-push | ||
uses: docker/build-push-action@v5 | ||
with: | ||
context: . | ||
push: true | ||
tags: elmernocon/semverkit:latest,elmernocon/semverkit:${{ github.event.release.tag_name }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
name: Publish to PyPI | ||
on: | ||
release: | ||
types: [ published ] | ||
workflow_dispatch: {} | ||
jobs: | ||
build-and-publish: | ||
name: Build package and Publish to PyPI | ||
strategy: | ||
fail-fast: true | ||
max-parallel: 1 | ||
matrix: | ||
os: | ||
- ubuntu-latest | ||
python-version: | ||
- 3.9 | ||
runs-on: ${{ matrix.os }} | ||
environment: | ||
name: pypi | ||
url: https://pypi.org/p/semverkit | ||
permissions: | ||
id-token: write | ||
steps: | ||
# This action checks-out your repository under $GITHUB_WORKSPACE, so your workflow can access it. | ||
- name: Checkout | ||
id: checkout | ||
uses: actions/checkout@master | ||
# This action provides the following functionality for GitHub Actions users: | ||
# - Installing a version of Python or PyPy and (by default) adding it to the PATH | ||
# - Optionally caching dependencies for pip, pipenv and poetry | ||
# - Registering problem matchers for error output | ||
- name: Setup Python | ||
id: setup-python | ||
uses: actions/setup-python@master | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
- name: Install Build | ||
id: install-build | ||
run: | | ||
python -m pip install --upgrade build | ||
- name: Run Build | ||
id: run-build | ||
run: | | ||
python -m build --sdist --wheel | ||
# This action allows you to upload your Python distribution packages in the dist/ directory to PyPI. | ||
- name: Publish to PyPI | ||
id: pypi-publish | ||
uses: pypa/gh-action-pypi-publish@release/v1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
name: Publish to Test PyPI | ||
on: | ||
workflow_dispatch: {} | ||
jobs: | ||
build-and-publish: | ||
name: Build package and Publish to Test PyPI | ||
strategy: | ||
fail-fast: true | ||
max-parallel: 1 | ||
matrix: | ||
os: | ||
- ubuntu-latest | ||
python-version: | ||
- 3.9 | ||
runs-on: ${{ matrix.os }} | ||
environment: | ||
name: testpypi | ||
url: https://test.pypi.org/p/semverkit | ||
permissions: | ||
id-token: write | ||
steps: | ||
# This action checks-out your repository under $GITHUB_WORKSPACE, so your workflow can access it. | ||
- name: Checkout | ||
id: checkout | ||
uses: actions/checkout@master | ||
# This action provides the following functionality for GitHub Actions users: | ||
# - Installing a version of Python or PyPy and (by default) adding it to the PATH | ||
# - Optionally caching dependencies for pip, pipenv and poetry | ||
# - Registering problem matchers for error output | ||
- name: Setup Python | ||
id: setup-python | ||
uses: actions/setup-python@master | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
- name: Install Build | ||
id: install-build | ||
run: | | ||
python -m pip install --upgrade build | ||
- name: Run Build | ||
id: run-build | ||
run: | | ||
python -m build --sdist --wheel | ||
# This action allows you to upload your Python distribution packages in the dist/ directory to PyPI. | ||
- name: Publish to Test PyPI | ||
id: pypi-publish | ||
uses: pypa/gh-action-pypi-publish@release/v1 | ||
with: | ||
repository-url: https://test.pypi.org/legacy/ | ||
skip-existing: true |