53 lines
1.2 KiB
YAML
53 lines
1.2 KiB
YAML
name: Building, testing and releasing LASP if it has a tag
|
|
|
|
on:
|
|
- push
|
|
|
|
jobs:
|
|
Build-Test-Ubuntu:
|
|
runs-on: ubuntu-latest
|
|
container:
|
|
image: ascee/ubuntu_build:latest
|
|
volumes:
|
|
- lasp_dist:/dist
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v3
|
|
with:
|
|
submodules: true
|
|
|
|
- name: Build and test
|
|
run: |
|
|
pip install build pytest
|
|
python3 -m build
|
|
pip install dist/lasp*.whl
|
|
pytest
|
|
|
|
- name: Cleanup old dist files and copy new to /dist dir
|
|
run: |-
|
|
rm -f /dist/*
|
|
cp -v dist/* /dist
|
|
|
|
Release-Ubuntu:
|
|
runs-on: ubuntu-latest
|
|
container:
|
|
volumes:
|
|
- lasp_dist:/dist
|
|
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
|
|
working-directory: "/"
|
|
with:
|
|
files: |-
|
|
../../../../../dist/**
|
|
api_key: '${{secrets.RELEASE_TOKEN}}'
|