Release when tag. That is the only way the release action is working
This commit is contained in:
parent
402425ebd1
commit
592448eea9
@ -1,51 +0,0 @@
|
||||
name: Building and releasing LASP (master branch)
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
|
||||
jobs:
|
||||
Build-Test-Ubuntu:
|
||||
runs-on: ubuntu-latest
|
||||
container:
|
||||
image: ascee/ubuntu_build:latest
|
||||
volumes:
|
||||
# Volumes should also be specified in config.yml of the act runner
|
||||
- lasp_dist:/dist
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
submodules: true
|
||||
|
||||
- name: Build
|
||||
run: |
|
||||
pip install build pytest
|
||||
python3 -m build
|
||||
pip install dist/lasp*.whl
|
||||
pytest
|
||||
- name: Copy dist
|
||||
run:
|
||||
cp -v dist/* /dist
|
||||
|
||||
Release-Ubuntu:
|
||||
runs-on: ubuntu-latest
|
||||
needs: Build-Test-Ubuntu
|
||||
container:
|
||||
volumes:
|
||||
- lasp_dist:/dist
|
||||
|
||||
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
|
||||
with:
|
||||
files: |-
|
||||
/dist/**
|
||||
api_key: '${{secrets.RELEASE_TOKEN}}'
|
@ -1,9 +1,7 @@
|
||||
name: Building and testing LASP (not-master branch)
|
||||
name: Building, testing and releasing LASP if it has a tag
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- '!master'
|
||||
- push
|
||||
|
||||
jobs:
|
||||
Build-Test-Ubuntu:
|
||||
@ -15,11 +13,36 @@ jobs:
|
||||
with:
|
||||
submodules: true
|
||||
|
||||
- name: Build
|
||||
- name: Build and test
|
||||
run: |
|
||||
pip install build pytest
|
||||
python3 -m build
|
||||
pip install dist/lasp*.whl
|
||||
pytest
|
||||
|
||||
- name: Copy dist files to /dist dir
|
||||
run:
|
||||
cp -v dist/* /dist
|
||||
|
||||
Release-Ubuntu:
|
||||
runs-on: ubuntu-latest
|
||||
needs: Build-Test-Ubuntu
|
||||
if: startsWith(gitea.ref, 'refs/tags/v')
|
||||
container:
|
||||
volumes:
|
||||
- lasp_dist:/dist
|
||||
|
||||
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
|
||||
with:
|
||||
files: |-
|
||||
/dist/**
|
||||
api_key: '${{secrets.RELEASE_TOKEN}}'
|
||||
|
Loading…
Reference in New Issue
Block a user