diff --git a/.forgejo/workflows/dev.yml b/.forgejo/workflows/dev.yml new file mode 100644 index 0000000..a38641e --- /dev/null +++ b/.forgejo/workflows/dev.yml @@ -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' diff --git a/.forgejo/workflows/release.yml b/.forgejo/workflows/release.yml new file mode 100644 index 0000000..ab66437 --- /dev/null +++ b/.forgejo/workflows/release.yml @@ -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' diff --git a/.gitignore b/.gitignore index 4c52255..4cd338c 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ config.yml .idea/ -releases.json \ No newline at end of file +releases.json +dist \ No newline at end of file diff --git a/.goreleaser.yaml b/.goreleaser.yaml new file mode 100644 index 0000000..42e6ebe --- /dev/null +++ b/.goreleaser.yaml @@ -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 \ No newline at end of file