lasp/.gitea/workflows/workflow.yml

53 lines
1.2 KiB
YAML
Raw Permalink 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
2024-06-19 08:15:28 +00:00
uses: actions/checkout@v3
2023-10-05 19:39:41 +00:00
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
2023-10-26 13:17:50 +00:00
- 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
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}}'