diff --git a/.goreleaser.yaml b/.goreleaser.yaml new file mode 100644 index 0000000..b5ff059 --- /dev/null +++ b/.goreleaser.yaml @@ -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 ' + 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 ' + 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 \ No newline at end of file diff --git a/.woodpecker.yml b/.woodpecker.yml new file mode 100644 index 0000000..d906b1a --- /dev/null +++ b/.woodpecker.yml @@ -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 \ No newline at end of file diff --git a/seashell.service b/seashell.service new file mode 100644 index 0000000..16b9739 --- /dev/null +++ b/seashell.service @@ -0,0 +1,11 @@ +[Unit] +Description=Seashell SSH Server +After=network.target + +[Service] +ExecStart=seashell +Restart=always +StandardOutput=journal + +[Install] +WantedBy=default.target \ No newline at end of file