Compare commits
4 Commits
Author | SHA1 | Date |
---|---|---|
raul | 3d2e0f24be | |
raul | e832a24249 | |
raul | c9036b547f | |
raul | 331b740342 |
|
@ -3,18 +3,40 @@ run-name: ${{ gitea.actor }} is testing out Gitea Actions 🚀
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches: [main]
|
branches: [main]
|
||||||
|
pull_request:
|
||||||
|
branches: [main]
|
||||||
jobs:
|
jobs:
|
||||||
Explore-Gitea-Actions:
|
audit:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
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!"
|
- uses: actions/checkout@v2
|
||||||
- run: echo "🔎 The name of your branch is ${{ gitea.ref }} and your repository is ${{ gitea.repository }}."
|
|
||||||
- name: Check out repository code
|
- name: Set up Go
|
||||||
uses: actions/checkout@v3
|
uses: actions/setup-go@v2
|
||||||
- run: echo "💡 The ${{ gitea.repository }} repository has been cloned to the runner."
|
with:
|
||||||
- run: echo "🖥️ The workflow is now ready to test your code on the runner."
|
go-version: '>=1.22.0'
|
||||||
- name: List files in the repository
|
|
||||||
run: |
|
- name: Verify dependencies
|
||||||
ls ${{ gitea.workspace }}
|
run: go mod verify
|
||||||
- run: echo "🍏 This job's status is ${{ job.status }}."
|
|
||||||
|
- 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 }}."
|
||||||
|
|
|
@ -0,0 +1,2 @@
|
||||||
|
|
||||||
|
dist/
|
|
@ -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
3
go.mod
|
@ -2,8 +2,9 @@ module actions-test
|
||||||
|
|
||||||
go 1.22.1
|
go 1.22.1
|
||||||
|
|
||||||
|
require github.com/spf13/cobra v1.8.0
|
||||||
|
|
||||||
require (
|
require (
|
||||||
github.com/inconshreveable/mousetrap v1.1.0 // indirect
|
github.com/inconshreveable/mousetrap v1.1.0 // indirect
|
||||||
github.com/spf13/cobra v1.8.0 // indirect
|
|
||||||
github.com/spf13/pflag v1.0.5 // indirect
|
github.com/spf13/pflag v1.0.5 // indirect
|
||||||
)
|
)
|
||||||
|
|
3
main.go
3
main.go
|
@ -6,6 +6,9 @@ Copyright © 2024 NAME HERE <EMAIL ADDRESS>
|
||||||
// This is a new change for triggering CI/CD!
|
// This is a new change for triggering CI/CD!
|
||||||
|
|
||||||
// Last testing change I promise
|
// Last testing change I promise
|
||||||
|
|
||||||
|
// Jokes on you, I LIED
|
||||||
|
|
||||||
package main
|
package main
|
||||||
|
|
||||||
import "actions-test/cmd"
|
import "actions-test/cmd"
|
||||||
|
|
Loading…
Reference in New Issue