mirror of
https://github.com/djhackersdev/bemanitools.git
synced 2024-11-27 16:00:52 +01:00
wip workflows
This commit is contained in:
parent
64901bdb61
commit
649e031712
38
.github/workflows/build-master.yaml
vendored
Normal file
38
.github/workflows/build-master.yaml
vendored
Normal file
@ -0,0 +1,38 @@
|
||||
name: "Build bemanitools"
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
jobs:
|
||||
build:
|
||||
runs-on: "ubuntu-22.04"
|
||||
steps:
|
||||
- name: "Checkout repository"
|
||||
uses: "actions/checkout@v2"
|
||||
|
||||
- name: "Install prerequisites"
|
||||
run: |
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y runc containerd docker.io
|
||||
|
||||
- name: "Build"
|
||||
run: |
|
||||
make build-docker
|
||||
|
||||
# Do some unpacking of the dist zip. Artifact upload repackages stuff
|
||||
- name: "Prepare artifact package"
|
||||
run: |
|
||||
mkdir artifact
|
||||
cd artifact
|
||||
unzip ../build/bemanitools.zip
|
||||
cd ..
|
||||
|
||||
- name: "Upload artifact"
|
||||
uses: "actions/upload-artifact@v2"
|
||||
with:
|
||||
name: bemanitools-${{ github.sha }}
|
||||
retention-days: 30
|
||||
if-no-files-found: "error"
|
||||
path: |
|
||||
artifact/**
|
71
.github/workflows/build-tag.yaml
vendored
Normal file
71
.github/workflows/build-tag.yaml
vendored
Normal file
@ -0,0 +1,71 @@
|
||||
name: "Build bemanitools"
|
||||
|
||||
on:
|
||||
push:
|
||||
tags:
|
||||
- "*.*"
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: "ubuntu-22.04"
|
||||
steps:
|
||||
- name: "Checkout repository"
|
||||
uses: "actions/checkout@v2"
|
||||
|
||||
# Building bootstrapped using docker containers
|
||||
- name: "Install prerequisites"
|
||||
run: |
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y runc containerd docker.io
|
||||
|
||||
- name: "Build"
|
||||
run: |
|
||||
make build-docker
|
||||
|
||||
# Do some unpacking of the dist zip. Artifact upload repackages stuff
|
||||
- name: "Prepare artifact package"
|
||||
run: |
|
||||
mkdir artifact
|
||||
cd artifact
|
||||
unzip ../build/bemanitools.zip
|
||||
cd ..
|
||||
|
||||
- name: "Upload artifact"
|
||||
uses: "actions/upload-artifact@v2"
|
||||
with:
|
||||
name: bemanitools-${{ github.sha }}
|
||||
retention-days: 30
|
||||
if-no-files-found: "error"
|
||||
path: |
|
||||
artifact/**
|
||||
|
||||
publish-release:
|
||||
needs: "build"
|
||||
runs-on: "ubuntu-22.04"
|
||||
steps:
|
||||
# This already extracts the contents of the artifact
|
||||
- name: "Download artifact"
|
||||
uses: "actions/download-artifact@v2"
|
||||
with:
|
||||
name: bemanitools-${{ github.sha }}
|
||||
|
||||
- name: "Get the version"
|
||||
id: get_version
|
||||
run: |
|
||||
echo ::set-output name=VERSION::$(echo $GITHUB_REF | cut -d / -f 3)
|
||||
|
||||
# The publish release action does not package the artifact *sigh*
|
||||
- name: "Create release package"
|
||||
run: |
|
||||
zip bemanitools-${{ steps.get_version.outputs.VERSION }}.zip *
|
||||
|
||||
- name: "Publish release"
|
||||
uses: "marvinpinto/action-automatic-releases@v1.2.1"
|
||||
with:
|
||||
repo_token: "${{ secrets.GITHUB_TOKEN }}"
|
||||
automatic_release_tag: "latest"
|
||||
draft: false
|
||||
prerelease: true
|
||||
title: ${{ steps.get_version.outputs.VERSION }}
|
||||
files: |
|
||||
bemanitools-${{ steps.get_version.outputs.VERSION }}.zip
|
Loading…
Reference in New Issue
Block a user