Try to introduce a gitlab ci release

This commit is contained in:
Melroy van den Berg 2025-04-24 18:08:55 +02:00
parent efa7a38276
commit 0aa49a988e
No known key found for this signature in database
GPG key ID: 71D11FF23454B9D7
2 changed files with 40 additions and 3 deletions

View file

@ -1,8 +1,20 @@
image: golang:latest
default:
image: golang:1.24
cache:
key:
files:
- go.mod
paths:
- .go/pkg/mod/
variables:
GOPATH: $CI_PROJECT_DIR/.go
stages:
- test
- build
- release
format:
stage: test
@ -10,11 +22,38 @@ format:
- go fmt $(go list ./... | grep -v /vendor/)
- go vet $(go list ./... | grep -v /vendor/)
go-mod-tidy:
stage: test
script:
- go mod tidy -diff
build:
stage: build
script:
- go build
- echo "ARTIFACT_URL=${CI_PROJECT_URL}/-/jobs/${CI_JOB_ID}/artifacts/file/fediresolve" >> variables.env
artifacts:
paths:
- fediresolve
reports:
dotenv: variables.env
expire_in: 1 week
release:
stage: release
image: registry.gitlab.com/gitlab-org/release-cli:latest
needs:
- job: build
artifacts: true
rules:
- if: $CI_COMMIT_TAG
script:
- echo "running release_job for $CI_COMMIT_TAG"
release:
name: "Release $CI_COMMIT_TAG"
tag_name: $CI_COMMIT_TAG
assets:
links:
- name: 'FediResolve'
url: ${ARTIFACT_URL}
filepath: '/assets/fediresolve'

View file

@ -4,8 +4,6 @@ FediResolve is a command-line tool for resolving and displaying Fediverse conten
It can parse and display ActivityPub content from various Fediverse platforms including Mastodon, Mbin, Lemmy, PeerTube, and others. For easy reading or debugging purposes.
~ Vibe coded within 2 hours.
## Features
- Resolve Fediverse URLs to their ActivityPub representation