8efe5ceda6
This PR is very far from perfect, and there are some things that do not work yet, but I think it's good enough to merge Co-authored-by: Shyam Saraswati <shyam.saraswati@gmail.com> Co-authored-by: Nikolai Rodionov <nikolai.rodionov@grandcentrix.net> Reviewed-on: https://git.badhouseplants.net/allanger/mkdocs-with-confluence/pulls/1
61 lines
1.4 KiB
YAML
61 lines
1.4 KiB
YAML
---
|
|
name: "Version build"
|
|
|
|
on:
|
|
push:
|
|
tags:
|
|
- "v*.*.*"
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: ${{ matrix.os }}
|
|
strategy:
|
|
fail-fast: false
|
|
# Currently, only for one arch, because I've got no idea about cross-platform and python
|
|
matrix:
|
|
include:
|
|
- os: ubuntu-latest
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v3
|
|
|
|
- uses: actions/setup-python@v4
|
|
with:
|
|
python-version: 3.9
|
|
|
|
- name: Setup poetry
|
|
uses: abatilo/actions-poetry@v2
|
|
with:
|
|
poetry-version: 1.3.2
|
|
|
|
- name: Build
|
|
run: poetry build
|
|
|
|
- name: Get archive name
|
|
run: echo "ARCHIVE_NAME=$(find $GITHUB_WORKSPACE/dist -maxdepth 1 -mindepth 1 -name '*tar.gz' -execdir basename '{}' ';')" >> $GITHUB_ENV
|
|
|
|
- name: Archive build artifacts
|
|
uses: actions/upload-artifact@v3
|
|
with:
|
|
name: ${{ env.ARCHIVE_NAME }}
|
|
path: ${{ github.workspace }}/dist/${{ env.ARCHIVE_NAME }}
|
|
|
|
release:
|
|
needs: build
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v3
|
|
|
|
- name: Download artifact
|
|
uses: actions/download-artifact@v3
|
|
with:
|
|
path: ${{ github.workspace }}/release/
|
|
- name: check
|
|
run: ls -R
|
|
|
|
- name: Release
|
|
uses: softprops/action-gh-release@v1
|
|
with:
|
|
files: ${{ github.workspace }}/release/*/*
|