Merge pull request #6 from haodeon/feat/0.6.0 #30
Workflow file for this run
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: | |
tags: | |
- '*.*.*' | |
jobs: | |
build: | |
strategy: | |
matrix: | |
os: [ ubuntu-20.04, windows-2019, macos-12 ] | |
python-version: [ '3.7.9', '3.8.10', '3.9.13', '3.10.11', '3.11.5' ] | |
runs-on: ${{ matrix.os }} | |
steps: | |
- name: Check out repository code | |
uses: actions/checkout@v2 | |
- name: Set up GoLang | |
uses: actions/setup-go@v2 | |
with: | |
go-version: '1.18' | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v2 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install poetry | |
run: | | |
python -m pip install poetry | |
- name: Fetch terraform repository | |
run: | | |
git submodule init | |
git submodule update | |
- name: Build distributions | |
run: | | |
poetry build -f wheel -vvv | |
- name: Upload distribution artifacts | |
uses: actions/upload-artifact@v3 | |
with: | |
name: libterraform-dist | |
path: dist | |
publish: | |
needs: [ build ] | |
runs-on: macos-latest | |
steps: | |
- name: Checkout repository code | |
uses: actions/checkout@v2 | |
- name: Set up Python 3.10 | |
uses: actions/setup-python@v2 | |
with: | |
python-version: '3.10' | |
- name: Download distribution artifacts | |
uses: actions/download-artifact@v3 | |
with: | |
name: libterraform-dist | |
path: dist | |
- name: Install poetry | |
run: | | |
python -m pip install poetry | |
- name: Create Release | |
uses: softprops/action-gh-release@v1 | |
- name: Publish to PyPI | |
env: | |
POETRY_PYPI_TOKEN_PYPI: ${{ secrets.PYPI_TOKEN }} | |
run: | | |
poetry config pypi-token.pypi $POETRY_PYPI_TOKEN_PYPI | |
poetry publish |