diff --git a/.gitea/workflows/release.yaml b/.gitea/workflows/release.yaml index 5564922..1c6da8f 100644 --- a/.gitea/workflows/release.yaml +++ b/.gitea/workflows/release.yaml @@ -18,20 +18,42 @@ jobs: SSH_AUTH_SOCK: /tmp/ssh.sock ENVIRONMENT: dev volumes: - - "/etc/timezone:/etc/timezone:ro" - - "/etc/localtime:/etc/localtime:ro" - "/etc/gitconfig:/etc/gitconfig:ro" - - "/${{ env.SSH_AUTH_SOCK }}:/tmp/ssh.sock" - "/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" - - "/etc/ssl/certs:/etc/ssl/certs:ro" options: --cpus 10 steps: - uses: actions/checkout@v3 - 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 rpm - uses: ncipollo/release-action@v1 with: artifacts: "jx,/root/rpmbuild/**/*.rpm" + build-focal: + runs-on: ubuntu-latest + permissions: + contents: write + container: + image: ubuntu:focal + env: + GOPATH: / + SSH_AUTH_SOCK: /tmp/ssh.sock + ENVIRONMENT: dev + 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" + options: --cpus 10 + steps: + - uses: actions/checkout@v3 + - run: make build-deps + - run: echo "$(pwd)/go/bin" >> $GITHUB_PATH + - run: make build + - run: make deb + - uses: ncipollo/release-action@v1 + with: + artifacts: "jx" diff --git a/.gitea/workflows/test.yaml b/.gitea/workflows/test.yaml index 317167c..286362b 100644 --- a/.gitea/workflows/test.yaml +++ b/.gitea/workflows/test.yaml @@ -78,6 +78,7 @@ jobs: 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 - name: Run build run: | @@ -115,6 +116,7 @@ jobs: - 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 diff --git a/Makefile b/Makefile index a925859..ef4b538 100644 --- a/Makefile +++ b/Makefile @@ -2,7 +2,6 @@ IMAGE?=fedora:latest LDFLAGS?=--ldflags '-extldflags "-static"' --ldflags="-X 'main.commit=$(shell git rev-parse HEAD)' -X 'main.version=$(shell git describe --tags)' -X 'main.date=$(shell date '+%Y-%m-%d %T.%s%z')'" export CGO_ENABLED=1 VERSION?=$(shell git describe --tags | sed -e 's/^v//' -e 's/-/_/g') -export PATH=$(PATH):$(shell pwd)/go/bin .PHONY=jx-cli build: jx-cli