mirror of
https://github.com/trustgraph-ai/trustgraph.git
synced 2026-04-25 00:16:23 +02:00
Workflows (#105)
* Some basic structure for workflows * Add PyPI publication for 0.12 * Bump version * Test bundle generation * Install jsonnet * Use release action to automate release creation
This commit is contained in:
parent
222dc9982c
commit
dda29bb663
3 changed files with 106 additions and 1 deletions
20
.github/workflows/pull-request.yaml
vendored
Normal file
20
.github/workflows/pull-request.yaml
vendored
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
|
||||
name: Test pull request
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
|
||||
container-push:
|
||||
|
||||
name: Do nothing
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
|
||||
84
.github/workflows/release.yaml
vendored
Normal file
84
.github/workflows/release.yaml
vendored
Normal file
|
|
@ -0,0 +1,84 @@
|
|||
|
||||
name: Build
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
push:
|
||||
# branches:
|
||||
# - release/v0.12
|
||||
tags:
|
||||
- v0.12.*
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
id-token: 'write'
|
||||
|
||||
jobs:
|
||||
|
||||
deploy:
|
||||
|
||||
name: Build everything
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
contents: write
|
||||
environment:
|
||||
name: release
|
||||
|
||||
steps:
|
||||
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Install build dependencies
|
||||
run: pip3 install jsonnet
|
||||
|
||||
- name: Get version
|
||||
id: version
|
||||
run: echo VERSION=sha-$(git rev-parse --short HEAD) >> $GITHUB_OUTPUT
|
||||
|
||||
- name: Build packages
|
||||
run: make packages
|
||||
|
||||
# - name: Build container
|
||||
# run: make container
|
||||
|
||||
# - name: Publish release distributions to PyPI
|
||||
# uses: pypa/gh-action-pypi-publish@release/v1
|
||||
|
||||
- name: Create deploy bundle
|
||||
run: templates/generate-all deploy.zip v${{ steps.version.outputs.VERSION }}
|
||||
|
||||
# - name: Create Release
|
||||
# id: create_release
|
||||
# uses: actions/create-release@v1
|
||||
# env:
|
||||
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token
|
||||
# with:
|
||||
# tag_name: ${{ github.ref }}
|
||||
# release_name: Release ${{ github.ref }}
|
||||
# body: |
|
||||
# Changes in this Release
|
||||
# - First Change
|
||||
# - Second Change
|
||||
# draft: true
|
||||
# prerelease: true
|
||||
|
||||
- uses: ncipollo/release-action@v1
|
||||
with:
|
||||
artifacts: deploy.zip
|
||||
generateReleaseNotes: true
|
||||
makeLatest: false
|
||||
prerelease: true
|
||||
skipIfReleaseExists: true
|
||||
|
||||
- name: Extract metadata for container
|
||||
id: meta
|
||||
uses: docker/metadata-action@v4
|
||||
with:
|
||||
images: trustgraph-flow
|
||||
tags: |
|
||||
type=ref,event=branch
|
||||
type=ref,event=pr
|
||||
type=semver,pattern={{version}}
|
||||
type=semver,pattern={{major}}.{{minor}}
|
||||
type=sha
|
||||
3
Makefile
3
Makefile
|
|
@ -1,6 +1,7 @@
|
|||
|
||||
# VERSION=$(shell git describe | sed 's/^v//')
|
||||
VERSION=0.12.0
|
||||
|
||||
VERSION=0.12.1
|
||||
|
||||
DOCKER=podman
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue