Skip to content

release: 1.0.6

release: 1.0.6 #34

Workflow file for this run

name: CI
on:
pull_request:
push:
branches:
- main
tags:
- '*'
workflow_dispatch:
jobs:
lint-and-test:
name: Lint and test
runs-on: ${{ matrix.os }}
strategy:
matrix:
python-version: ['3.10']
os: [ubuntu-latest]
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install
run: pip install -e ./src/ros_d2
- uses: pre-commit/[email protected]
release:
name: Release
env:
DIST_ARCHIVE_NAME: ${{ github.event.repository.name }}-dist
runs-on: ${{ matrix.os }}
needs: [lint-and-test]
if: startsWith(github.ref, 'refs/tags/')
strategy:
matrix:
python-version: ['3.10']
os: [ubuntu-latest]
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Get the version
id: get_version
run: echo ::set-output name=VERSION::$(echo $GITHUB_REF | cut -d / -f 3)
- name: Build changelog
id: build_changelog
uses: mikepenz/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
configuration: '.github/config/changelog_configuration.json'
ignorePreReleases: 'false'
- name: Package release
uses: papeloto/action-zip@v1
with:
files: ./
recursive: false
dest: ${{ env.DIST_ARCHIVE_NAME }}-${{ steps.get_version.outputs.VERSION }}.zip
- name: Release
uses: softprops/action-gh-release@v1
with:
body: ${{steps.build_changelog.outputs.changelog}}
files: |
${{ env.DIST_ARCHIVE_NAME }}-${{ steps.get_version.outputs.VERSION }}.zip
env:
GITHUB_TOKEN: ${{ secrets.github_token }}
- name: Build and Publish to PyPi
shell: bash
working-directory: ./src/ros_d2
env:
TWINE_USERNAME: ${{ secrets.TWINE_USERNAME }}
TWINE_PASSWORD: ${{ secrets.TWINE_PASSWORD }}
TWINE_NON_INTERACTIVE: true
run: |
cp ../../README.md .
python3 -m pip install --user --upgrade setuptools wheel
python3 setup.py sdist bdist_wheel
python3 -m pip install --user --upgrade twine
python3 -m twine upload dist/*