2023-10-16 13:17:00 +00:00
|
|
|
name: Building, testing and releasing LASP if it has a tag
|
2023-10-05 19:39:41 +00:00
|
|
|
|
|
|
|
on:
|
2023-10-16 13:17:00 +00:00
|
|
|
- push
|
2023-10-05 19:39:41 +00:00
|
|
|
|
|
|
|
jobs:
|
|
|
|
Build-Test-Ubuntu:
|
|
|
|
runs-on: ubuntu-latest
|
2023-10-16 13:24:20 +00:00
|
|
|
container:
|
|
|
|
image: ascee/ubuntu_build:latest
|
|
|
|
volumes:
|
2023-10-16 13:54:08 +00:00
|
|
|
- lasp_dist:/dist
|
2023-10-05 19:39:41 +00:00
|
|
|
steps:
|
|
|
|
- name: Checkout
|
|
|
|
uses: actions/checkout@v4
|
|
|
|
with:
|
|
|
|
submodules: true
|
|
|
|
|
2023-10-16 13:17:00 +00:00
|
|
|
- name: Build and test
|
2023-10-05 19:39:41 +00:00
|
|
|
run: |
|
2023-10-11 15:13:59 +00:00
|
|
|
pip install build pytest
|
2023-10-05 19:39:41 +00:00
|
|
|
python3 -m build
|
2023-10-11 15:13:59 +00:00
|
|
|
pip install dist/lasp*.whl
|
|
|
|
pytest
|
2023-10-05 19:52:51 +00:00
|
|
|
|
2023-10-16 13:17:00 +00:00
|
|
|
- name: Copy dist files to /dist dir
|
|
|
|
run:
|
|
|
|
cp -v dist/* /dist
|
2023-10-11 15:03:55 +00:00
|
|
|
|
2023-10-16 13:17:00 +00:00
|
|
|
Release-Ubuntu:
|
|
|
|
runs-on: ubuntu-latest
|
2023-10-16 13:24:20 +00:00
|
|
|
container:
|
|
|
|
volumes:
|
2023-10-16 13:26:42 +00:00
|
|
|
- lasp_dist:/dist
|
2023-10-16 13:17:00 +00:00
|
|
|
needs: Build-Test-Ubuntu
|
|
|
|
if: startsWith(gitea.ref, 'refs/tags/v')
|
|
|
|
steps:
|
|
|
|
- name: Checkout
|
|
|
|
uses: actions/checkout@v4
|
|
|
|
|
|
|
|
- name: setup go
|
|
|
|
uses: https://github.com/actions/setup-go@v4
|
|
|
|
with:
|
|
|
|
go-version: '1.18'
|
|
|
|
- name: Release
|
|
|
|
uses: https://gitea.com/actions/release-action@main
|
2023-10-16 13:36:15 +00:00
|
|
|
working-directory: "/"
|
2023-10-16 13:17:00 +00:00
|
|
|
with:
|
|
|
|
files: |-
|
2023-10-16 13:53:06 +00:00
|
|
|
../../../../../dist/**
|
2023-10-16 13:17:00 +00:00
|
|
|
api_key: '${{secrets.RELEASE_TOKEN}}'
|