-
Notifications
You must be signed in to change notification settings - Fork 3
36 lines (35 loc) · 1.9 KB
/
Copy pathmain.yml
File metadata and controls
36 lines (35 loc) · 1.9 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
on: [push]
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
submodules: recursive
- name: Log in to the Container registry
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Pull image from ghcr.io
run: docker pull ghcr.io/tmck-code/pokesay:latest
- name: Make dist directory
run: mkdir -p dist/bin/ dist/packages/ dist/tarballs/
- name: Build cows
run: docker run -v ${PWD}:/usr/local/src -v ${PWD}/build/cows:/tmp/cows -v ${PWD}/build/pokesprite-ansi:/tmp/original/cows -u root --platform linux/amd64 ghcr.io/tmck-code/pokesay:latest ./build/scripts/build_cowfiles.sh
- name: Build go binary assets
run: docker run -v ${PWD}:/usr/local/src -v ${PWD}/build/cows:/tmp/cows -u root --platform linux/amd64 -e VERSION=0.1 ghcr.io/tmck-code/pokesay:latest ./build/scripts/build_assets.sh
- name: Run unit tests
run: docker run -v ${PWD}:/usr/local/src -u root ghcr.io/tmck-code/pokesay:latest gotestsum --debug
- name: Build go binaries
run: docker run -v ${PWD}:/usr/local/src -u root --platform linux/amd64 -e VERSION=0.1 ghcr.io/tmck-code/pokesay:latest ./build/scripts/build_bin.sh
- name: Check build
run: ls -alh dist/bin
- name: Test build
run: echo w | ./dist/bin/pokesay-0.1-linux-amd64
- name: Build deb package
run: docker run -v ${PWD}:/usr/local/src -u root -e VERSION=0.1 -e DEBUG=1 ghcr.io/tmck-code/pokesay:latest bash -c "./build/scripts/build_packages.sh deb"
- name: Build arch package
run: docker run -v ${PWD}:/usr/local/src -u root -e VERSION=0.1 -e DEBUG=1 archlinux:base-devel bash -c "useradd u -m && VERSION=0.1 /usr/local/src/build/scripts/build_packages.sh arch"