Compare commits

..

4 Commits

Author SHA1 Message Date
raul 3d2e0f24be Fix goreleaser packaging Win packages in tar.gz
Gitea Actions Demo / audit (push) Successful in 1m1s Details
2024-03-31 11:02:27 +02:00
raul e832a24249 Updated goreleaser.yaml
Gitea Actions Demo / audit (push) Successful in 1m1s Details
2024-03-31 10:49:50 +02:00
raul c9036b547f Adding goreleaser config
Gitea Actions Demo / audit (push) Successful in 1m9s Details
2024-03-31 10:33:14 +02:00
raul 331b740342 Add Go testing actions
Gitea Actions Demo / audit (push) Successful in 3m1s Details
2024-03-30 16:38:15 +01:00
5 changed files with 92 additions and 13 deletions

View File

@ -3,18 +3,40 @@ run-name: ${{ gitea.actor }} is testing out Gitea Actions 🚀
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
Explore-Gitea-Actions:
audit:
runs-on: ubuntu-latest
steps:
- run: echo "🎉 The job was automatically triggered by a ${{ gitea.event_name }} event."
- run: echo "🐧 This job is now running on a ${{ runner.os }} server hosted by Gitea!"
- run: echo "🔎 The name of your branch is ${{ gitea.ref }} and your repository is ${{ gitea.repository }}."
- name: Check out repository code
uses: actions/checkout@v3
- run: echo "💡 The ${{ gitea.repository }} repository has been cloned to the runner."
- run: echo "🖥️ The workflow is now ready to test your code on the runner."
- name: List files in the repository
run: |
ls ${{ gitea.workspace }}
- run: echo "🍏 This job's status is ${{ job.status }}."
- uses: actions/checkout@v2
- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: '>=1.22.0'
- name: Verify dependencies
run: go mod verify
- name: Build
run: go build -v ./...
- name: Run go vet
run: go vet ./...
# - run: echo "🎉 The job was automatically triggered by a ${{ gitea.event_name }} event."
# - run: echo "🐧 This job is now running on a ${{ runner.os }} server hosted by Gitea!"
# - run: echo "🔎 The name of your branch is ${{ gitea.ref }} and your repository is ${{ gitea.repository }}."
# - name: Check out repository code
# uses: actions/checkout@v3
# - run: echo "💡 The ${{ gitea.repository }} repository has been cloned to the runner."
# - run: echo "🖥️ The workflow is now ready to test your code on the runner."
# - name: List files in the repository
# run: |
# ls ${{ gitea.workspace }}
# - run: echo "🍏 This job's status is ${{ job.status }}."

2
.gitignore vendored Normal file
View File

@ -0,0 +1,2 @@
dist/

51
.goreleaser.yaml Normal file
View File

@ -0,0 +1,51 @@
# This is an example .goreleaser.yml file with some sensible defaults.
# Make sure to check the documentation at https://goreleaser.com
# The lines below are called `modelines`. See `:help modeline`
# Feel free to remove those if you don't want/need to use them.
# yaml-language-server: $schema=https://goreleaser.com/static/schema.json
# vim: set ts=2 sw=2 tw=0 fo=cnqoj
version: 1
before:
hooks:
# You may remove this if you don't use go modules.
- go mod tidy
# you may remove this if you don't need go generate
- go generate ./...
gitea_urls:
api: https://git.bulgariu.xyz/api/v1
download: https://git.bulgariu.xyz
builds:
- env:
- CGO_ENABLED=0
goos:
- linux
- windows
goarch:
- amd64
archives:
- format: tar.gz
# this name template makes the OS and Arch compatible with the results of `uname`.
name_template: >-
{{ .ProjectName }}_
{{- title .Os }}_
{{- if eq .Arch "amd64" }}x86_64
{{- else if eq .Arch "386" }}i386
{{- else }}{{ .Arch }}{{ end }}
{{- if .Arm }}v{{ .Arm }}{{ end }}
# use zip for windows archives
format_overrides:
- goos: windows
format: zip
changelog:
sort: asc
filters:
exclude:
- "^docs:"
- "^test:"

3
go.mod
View File

@ -2,8 +2,9 @@ module actions-test
go 1.22.1
require github.com/spf13/cobra v1.8.0
require (
github.com/inconshreveable/mousetrap v1.1.0 // indirect
github.com/spf13/cobra v1.8.0 // indirect
github.com/spf13/pflag v1.0.5 // indirect
)

View File

@ -6,6 +6,9 @@ Copyright © 2024 NAME HERE <EMAIL ADDRESS>
// This is a new change for triggering CI/CD!
// Last testing change I promise
// Jokes on you, I LIED
package main
import "actions-test/cmd"