Merge branch 'main' of https://github.com/raddessi/salt-gnupg-rotate #24
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
name: release | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
tag: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
with: | |
fetch-depth: 0 | |
- uses: actions/setup-python@v2 | |
with: | |
python-version: "3.10" | |
- name: Install dependencies | |
run: | | |
pip3 install poetry | |
- name: Python Semantic Release | |
uses: python-semantic-release/python-semantic-release@v8.3.0 | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
- name: Store the release tag | |
id: release_version | |
run: | | |
echo "release_version=$(poetry version --short)" >> $GITHUB_ENV | |
outputs: | |
release_version: ${{ env.release_version }} | |
build: | |
needs: tag | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
with: | |
ref: v${{ needs.tag.outputs.release_version }} | |
- uses: actions/setup-python@v2 | |
with: | |
python-version: "3.10" | |
- name: Install build dependencies | |
run: | | |
pip3 install poetry | |
- name: Build | |
run: poetry build | |
- name: Upload Artifacts | |
uses: actions/upload-artifact@v2 | |
with: | |
name: salt-gnupg-rotate | |
path: dist/* | |
if-no-files-found: error | |
- name: Upload Artifacts to Release | |
uses: svenstaro/upload-release-action@v2 | |
with: | |
repo_token: ${{ secrets.GITHUB_TOKEN }} | |
file: dist/* | |
file_glob: true | |
tag: v${{ needs.tag.outputs.release_version }} | |
overwrite: true | |
docs-build: | |
needs: tag | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
with: | |
ref: v${{ needs.tag.outputs.release_version }} | |
- uses: actions/setup-python@v2 | |
with: | |
python-version: "3.10" | |
- name: Install dependencies | |
run: | | |
pip3 install poetry nox nox-poetry | |
- name: Build the standalone documentation | |
run: | | |
nox -s docs-build --force-color | |
- name: Create standalone documentation zip | |
working-directory: docs/_build | |
run: | | |
zip -r salt-gnupg-rotate-${{ needs.tag.outputs.release_version }}-documentation.zip .* | |
- name: Upload Artifacts to Release | |
uses: svenstaro/upload-release-action@v2 | |
with: | |
repo_token: ${{ secrets.GITHUB_TOKEN }} | |
file: docs/_build/*-documentation.zip | |
file_glob: true | |
tag: v${{ needs.tag.outputs.release_version }} | |
overwrite: true |