mirror of
https://github.com/pumpitupdev/pumptools.git
synced 2026-09-26 16:38:29 +03:00
79 lines
1.9 KiB
YAML
79 lines
1.9 KiB
YAML
# Regarding build steps, this is a copy of the Dockerfile and should be kept in-sync
|
|
name: "Build pumptools"
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- ci-github
|
|
release:
|
|
types:
|
|
- created
|
|
workflow_dispatch: # allows you to trigger manually
|
|
|
|
# TODO check github actions doc to evaluate if we need this or if this is even a good idea
|
|
# concurrency:
|
|
# group: ${{ github.workflow }}-${{ github.ref }}
|
|
# cancel-in-progress: true
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: "ubuntu-20.04"
|
|
steps:
|
|
- name: "Checkout repository"
|
|
uses: "actions/checkout@v2"
|
|
|
|
- name: "Show workspace"
|
|
run: |
|
|
pwd
|
|
ls -lah
|
|
|
|
- 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/docker/pumptools-public.zip
|
|
cd ..
|
|
|
|
- name: "Upload artifact"
|
|
uses: "actions/upload-artifact@v2"
|
|
with:
|
|
name: "pumptools-${{ github.ref }}"
|
|
retention-days: 30
|
|
path: |
|
|
artifact/**
|
|
|
|
publish-release:
|
|
needs: "build"
|
|
runs-on: "ubuntu-20.04"
|
|
steps:
|
|
- name: "Download artifact"
|
|
uses: "actions/download-artifact@v2"
|
|
with:
|
|
name: "pumptools-${{ github.ref }}"
|
|
|
|
- name: "Extract artifact"
|
|
run: |
|
|
mkdir artifact
|
|
cd artifact
|
|
unzip ../pumptools-${{ github.ref }}.zip
|
|
cd ..
|
|
|
|
- uses: "marvinpinto/action-automatic-releases@v1.2.1"
|
|
with:
|
|
repo_token: "${{ secrets.GITHUB_TOKEN }}"
|
|
automatic_release_tag: "latest"
|
|
prerelease: true
|
|
title: "master ${{ github.ref }}"
|
|
files: |
|
|
artifact/**
|