Skip to content

Release 0.4.17

Release 0.4.17 #62

Workflow file for this run

name: release
on:
push:
tags:
- '*.*.*'
- '*.*.*-*'
jobs:
build:
runs-on: ubuntu-20.04
steps:
- name: Build package using Poetry and store result
uses: chaoss/grimoirelab-github-actions/build@master
with:
artifact-name: graal-dist
artifact-path: dist
tests:
needs: [build]
runs-on: ubuntu-20.04
strategy:
matrix:
python-version: ['3.8', '3.9', '3.10']
steps:
- uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 # 3.1.0
- name: Download distribution artifact
uses: actions/download-artifact@fb598a63ae348fa914e94cd0ff38f362e927b741 # v3.0.0
with:
name: graal-dist
path: dist
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@13ae5bb136fac2878aff31522b9efb785519f984 # v4.3.0
with:
python-version: ${{ matrix.python-version }}
- name: Set up Ruby
uses: ruby/setup-ruby@eae47962baca661befdfd24e4d6c34ade04858f7 # v1.118.0
with:
ruby-version: 2.6
- name: Set up Go
uses: actions/setup-go@c4a742cab115ed795e34d4513e2cf7d472deb55f # v3.3.1
with:
go-version: '^1.17'
- name: Install poetry
run: |
curl -sSL https://install.python-poetry.org | python3 -
echo "PATH=$HOME/.poetry/bin:$PATH" >> $GITHUB_ENV
- name: Install dependencies
run: |
gem install github-linguist -v 7.15
wget https://github.com/fossology/fossology/releases/download/3.11.0/FOSSology-3.11.0-ubuntu-focal.tar.gz
tar -xzf FOSSology-3.11.0-ubuntu-focal.tar.gz
sudo apt-get update -y
sudo apt-get -y install ./packages/fossology-common_3.11.0-1_amd64.deb \
./packages/fossology-nomos_3.11.0-1_amd64.deb
sudo apt-get install cloc
- name: Install dev dependencies
run: |
poetry install --only dev --no-root
- name: Install requirements
run: |
mkdir exec
cd exec
go install github.com/boyter/scc@latest
cd $GITHUB_WORKSPACE/exec/
git clone https://github.com/nexB/scancode-toolkit.git
cd scancode-toolkit
git checkout -b test_scancli 96069fd84066c97549d54f66bd2fe8c7813c6b52
./scancode --help
cd $GITHUB_WORKSPACE/exec/
wget https://github.com/crossminer/crossJadolint/releases/download/Pre-releasev2/jadolint.jar
cd $GITHUB_WORKSPACE/
- name: Test package
run: |
PACKAGE=`(cd dist && ls *whl)` && echo $PACKAGE
poetry run pip install --pre ./dist/$PACKAGE
cd tests && poetry run python run_tests.py
release:
needs: [tests]
runs-on: ubuntu-latest
steps:
- name: Create a new release on the repository
uses: chaoss/grimoirelab-github-actions/release@master
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
publish:
needs: [tests]
runs-on: ubuntu-latest
steps:
- name: Publish the package on PyPI
uses: chaoss/grimoirelab-github-actions/publish@master
with:
artifact-name: graal-dist
artifact-path: dist
pypi-api-token: ${{ secrets.PYPI_API_TOKEN }}