jx/.gitea/workflows/release.yaml

39 lines
1.1 KiB
YAML
Raw Normal View History

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:
build:
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:
- "/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
2024-04-03 19:42:12 +00:00
steps:
- uses: actions/checkout@v3
2024-05-26 09:05:18 +00:00
- run: echo "VERSION=${GITHUB_REF#refs/*/v}" >> $GITHUB_ENV
2024-05-26 22:57:23 +00:00
- run: dnf install -y dnf-plugins-core rpm-build rpmdevtools
2024-05-26 22:17:40 +00:00
- run: dnf builddep -y build/jx.spec
2024-05-26 09:05:18 +00:00
- run: make rpm
2024-04-03 19:42:12 +00:00
- uses: ncipollo/release-action@v1
with:
2024-05-26 21:28:45 +00:00
artifacts: "jx,/root/rpmbuild/**/*.rpm"