lasp/.gitea/workflows/workflow.yml

52 lines
1.1 KiB
YAML
Raw Normal View History

name: Building, testing and releasing LASP if it has a tag
2023-10-05 19:39:41 +00:00
on:
- 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:
- lasp_dist:/dist
2023-10-05 19:39:41 +00:00
steps:
- name: Checkout
uses: actions/checkout@v4
with:
submodules: true
- 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
- name: Copy dist files to /dist dir
run:
cp -v dist/* /dist
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
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}}'