ci: add ci system
Dev Version / Release (push) Failing after 1m51s Details

This commit is contained in:
Kekskurse 2023-08-06 14:44:13 +02:00
parent 4c7948d336
commit 8ac5299a26
Signed by: kekskurse
GPG Key ID: 728ACCB59341E7E4
4 changed files with 121 additions and 1 deletions

View File

@ -0,0 +1,35 @@
name: Dev Version
run-name: ${{ github.actor }} is testing
on: ["push"]
jobs:
Release:
runs-on: docker
#container:
# image: goreleaser/goreleaser
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
#- run: goreleaser release --skip-publish --snapshot --rm-dist --debug
- name: Setup Go environment
uses: https://github.com/actions/setup-go@v2.1.3
with:
go-version: 1.20
- name: Run GoReleaser
uses: https://github.com/goreleaser/goreleaser-action@v4
with:
# either 'goreleaser' (default) or 'goreleaser-pro'
distribution: goreleaser
version: latest
args: release --skip-publish --snapshot --rm-dist --debug --clean
- name: Copy deb to publish folder
run: mkdir publish; cp dist/softwatch_linux_amd64_v1/softwatch publish/softwatch_linux_amd64; cp dist/softwatch_linux_arm_7/publish/softwatch_linux_arm_7
- name: Upload to s3
uses: https://github.com/shallwefootball/s3-upload-action@master
with:
aws_key_id: ${{ secrets.AWS_KEY_ID }}
aws_secret_access_key: ${{ secrets.AWS_SECRET_ACCESS_KEY}}
aws_bucket: 'kekscloud-releases'
source_dir: 'publish/'
destination_dir: 'softwatch/'
endpoint: 's3.eu-central-003.backblazeb2.com'

View File

@ -0,0 +1,41 @@
name: Dev Version
run-name: ${{ github.actor }} is testing
on:
push:
tags:
- '*'
jobs:
Release:
runs-on: docker
#container:
# image: goreleaser/goreleaser
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
#- run: goreleaser release --skip-publish --snapshot --rm-dist --debug
- name: Setup Go environment
uses: https://github.com/actions/setup-go@v2.1.3
with:
go-version: 1.20
- name: Run GoReleaser
uses: https://github.com/goreleaser/goreleaser-action@v4
with:
# either 'goreleaser' (default) or 'goreleaser-pro'
distribution: goreleaser
version: latest
args: release --clean
env:
GITEA_TOKEN: ${{ secrets.TOKEN }}
GORELEASER_FORCE_TOKEN: "gitea"
- name: Copy deb to publish folder
run: mkdir publish; cp dist/softwatch_linux_amd64_v1/softwatch publish/softwatch_linux_amd64; cp dist/softwatch_linux_arm_7/publish/softwatch_linux_arm_7
- name: Upload to s3
uses: https://github.com/shallwefootball/s3-upload-action@master
with:
aws_key_id: ${{ secrets.AWS_KEY_ID }}
aws_secret_access_key: ${{ secrets.AWS_SECRET_ACCESS_KEY}}
aws_bucket: 'kekscloud-releases'
source_dir: 'publish/'
destination_dir: 'softwatch/'
endpoint: 's3.eu-central-003.backblazeb2.com'

3
.gitignore vendored
View File

@ -1,3 +1,4 @@
config.yml
.idea/
releases.json
releases.json
dist

43
.goreleaser.yaml Normal file
View File

@ -0,0 +1,43 @@
# This is an example .goreleaser.yml file with some sensible defaults.
# Make sure to check the documentation at https://goreleaser.com
project_name: softwatch
before:
hooks:
# You may remove this if you don't use go modules.
- go mod tidy
builds:
- env:
- CGO_ENABLED=0
goos:
- linux
goarch:
- amd64
- arm
goarm:
- 7
archives:
- format: tar.gz
# this name template makes the OS and Arch compatible with the results of uname.
name_template: >-
{{ .ProjectName }}_{{ .Version }}_{{ .Arch }}
checksum:
name_template: 'checksums.txt'
snapshot:
name_template: "{{ incpatch .Version }}-prebuild"
changelog:
sort: asc
filters:
exclude:
- '^docs:'
- '^test:'
- 'stuff'
gitea_urls:
api: https://git.keks.cloud/api/v1
download: https://git.keks.cloud
# set to true if you use a self-signed certificate
skip_tls_verify: false