Add CI configuration
Some checks failed
ci/woodpecker/push/woodpecker Pipeline was successful
ci/woodpecker/tag/woodpecker Pipeline failed

This commit is contained in:
Elara 2024-08-08 14:34:42 -07:00
parent ca02d9b609
commit a9fdf0a053
3 changed files with 106 additions and 0 deletions

70
.goreleaser.yaml Normal file
View File

@ -0,0 +1,70 @@
before:
hooks:
- go mod tidy
builds:
- id: seashell
env:
- CGO_ENABLED=0
binary: seashell
goos:
- linux
goarch:
- amd64
- "386"
- arm64
- arm
- riscv64
archives:
- files:
- seashell.service
nfpms:
- id: seashell
description: "SSH server with virtual hosts and username-based routing"
homepage: 'https://gitea.elara.ws/Elara6331/seashell'
maintainer: 'Elara Ivy <elara@elara.ws>'
license: AGPLv3
formats:
- deb
- rpm
- apk
- archlinux
provides:
- seashell
conflicts:
- seashell
contents:
- src: seashell.service
dst: /etc/systemd/system/seashell.service
aurs:
- name: seashell-bin
description: "SSH server with virtual hosts and username-based routing"
homepage: 'https://gitea.elara.ws/Elara6331/seashell'
maintainers:
- 'Elara Ivy <elara@elara.ws>'
license: AGPLv3
private_key: '{{ .Env.AUR_KEY }}'
git_url: 'ssh://aur@aur.archlinux.org/seashell-bin.git'
provides:
- seashell
conflicts:
- seashell
package: |-
# binaries
install -Dm755 ./seashell "${pkgdir}/usr/bin/seashell"
# services
install -Dm644 ./seashell.service "${pkgdir}/etc/systemd/system/seashell.service"
release:
gitea:
owner: Elara6331
name: seashell
gitea_urls:
api: 'https://gitea.elara.ws/api/v1/'
download: 'https://gitea.elara.ws'
skip_tls_verify: false
checksum:
name_template: 'checksums.txt'
snapshot:
name_template: "{{ incpatch .Version }}-next"
changelog:
sort: asc

25
.woodpecker.yml Normal file
View File

@ -0,0 +1,25 @@
labels:
platform: linux/amd64
steps:
publish:
image: woodpeckerci/plugin-kaniko
settings:
registry: gitea.elara.ws
repo: elara6331/seashell
tags: latest,${CI_COMMIT_TAG}
cache: false
username:
from_secret: docker_username
password:
from_secret: docker_password
when:
event: tag
release:
image: goreleaser/goreleaser
commands:
- goreleaser release
secrets: [ gitea_token, aur_key ]
when:
event: tag

11
seashell.service Normal file
View File

@ -0,0 +1,11 @@
[Unit]
Description=Seashell SSH Server
After=network.target
[Service]
ExecStart=seashell
Restart=always
StandardOutput=journal
[Install]
WantedBy=default.target