2024-04-03 19:42:12 +00:00
|
|
|
name: Releases
|
|
|
|
|
|
|
|
on:
|
2024-05-06 23:06:25 +00:00
|
|
|
create:
|
2024-04-03 19:42:12 +00:00
|
|
|
tags:
|
2024-05-06 23:06:25 +00:00
|
|
|
- 'v*'
|
2024-04-03 19:42:12 +00:00
|
|
|
|
|
|
|
jobs:
|
|
|
|
|
2024-05-29 07:25:29 +00:00
|
|
|
build-fedora:
|
2024-04-03 19:42:12 +00:00
|
|
|
runs-on: ubuntu-latest
|
|
|
|
permissions:
|
|
|
|
contents: write
|
2024-05-26 09:05:18 +00:00
|
|
|
container:
|
|
|
|
image: fedora:latest
|
|
|
|
env:
|
|
|
|
GOPATH: /
|
|
|
|
SSH_AUTH_SOCK: /tmp/ssh.sock
|
|
|
|
ENVIRONMENT: dev
|
|
|
|
volumes:
|
2024-05-29 07:25:29 +00:00
|
|
|
- "/etc/timezone:/etc/timezone:ro"
|
|
|
|
- "/etc/localtime:/etc/localtime:ro"
|
2024-05-26 09:05:18 +00:00
|
|
|
- "/etc/gitconfig:/etc/gitconfig:ro"
|
|
|
|
- "/opt/gitea/act_runner/.ssh/known_hosts:/root/.ssh/known_hosts"
|
|
|
|
- "/opt/gitea/act_runner/.gitconfig:/root/.gitconfig:ro"
|
|
|
|
- "/opt/gitea/act_runner/.git-credentials:/root/.git-credentials:ro"
|
2024-05-29 07:25:29 +00:00
|
|
|
- "/etc/ssl/certs:/etc/ssl/certs:ro"
|
|
|
|
options: --cpus 4
|
2024-04-03 19:42:12 +00:00
|
|
|
steps:
|
2024-05-29 07:25:29 +00:00
|
|
|
- run: dnf install -y nodejs git make
|
|
|
|
- uses: actions/checkout@v3
|
|
|
|
with:
|
|
|
|
fetch-depth: 0
|
|
|
|
- run: dnf install -y dnf-plugins-core rpm-build rpmdevtools
|
|
|
|
- run: echo "$(pwd)/go/bin" >> $GITHUB_PATH
|
|
|
|
- run: dnf builddep -y build/jx.spec
|
|
|
|
- run: make build
|
|
|
|
- run: make rpm
|
|
|
|
- name: Archive binary
|
|
|
|
uses: actions/upload-artifact@v3
|
|
|
|
with:
|
|
|
|
name: "jx-fedora-40"
|
|
|
|
path: "jx"
|
|
|
|
- uses: actions/upload-artifact@v3
|
|
|
|
with:
|
|
|
|
name: "RPMS"
|
|
|
|
path: "/root/rpmbuild/**/*.rpm"
|
|
|
|
- uses: ncipollo/release-action@v1
|
|
|
|
with:
|
|
|
|
artifacts: "jx,/root/rpmbuild/**/*.rpm"
|
|
|
|
- run: echo "This job's status is ${{ job.status }}."
|
|
|
|
build-ubuntu-focal:
|
2024-05-29 06:03:10 +00:00
|
|
|
runs-on: ubuntu-latest
|
|
|
|
permissions:
|
|
|
|
contents: write
|
|
|
|
container:
|
|
|
|
image: ubuntu:focal
|
|
|
|
env:
|
|
|
|
GOPATH: /
|
|
|
|
SSH_AUTH_SOCK: /tmp/ssh.sock
|
|
|
|
ENVIRONMENT: dev
|
2024-05-29 07:25:29 +00:00
|
|
|
DEBIAN_FRONTEND: noninteractive
|
|
|
|
TZ: America/Los_Angeles
|
2024-05-29 06:03:10 +00:00
|
|
|
volumes:
|
|
|
|
- "/etc/gitconfig:/etc/gitconfig:ro"
|
|
|
|
- "/opt/gitea/act_runner/.ssh/known_hosts:/root/.ssh/known_hosts"
|
|
|
|
- "/opt/gitea/act_runner/.gitconfig:/root/.gitconfig:ro"
|
|
|
|
- "/opt/gitea/act_runner/.git-credentials:/root/.git-credentials:ro"
|
2024-05-29 07:25:29 +00:00
|
|
|
options: --cpus 4
|
2024-05-29 06:03:10 +00:00
|
|
|
steps:
|
2024-05-29 07:25:29 +00:00
|
|
|
- run: apt-get -y update && apt-get install -y tzdata
|
|
|
|
- run: apt-get install -y nodejs git make
|
|
|
|
- uses: actions/checkout@v3
|
|
|
|
with:
|
|
|
|
fetch-depth: 0
|
|
|
|
- run: echo "$(pwd)/go/bin" >> $GITHUB_PATH
|
|
|
|
- run: make ubuntu-deps
|
|
|
|
- run: make build
|
|
|
|
- run: make deb
|
|
|
|
- uses: actions/upload-artifact@v3
|
|
|
|
with:
|
|
|
|
name: "jx-ubuntu-focal"
|
|
|
|
path: "jx"
|
|
|
|
- uses: ncipollo/release-action@v1
|
|
|
|
with:
|
|
|
|
artifacts: "jx"
|