A ready-to-use CI/CD Pipeline for uploading assets to gitlab releases.
Run the following command:
fluentci run gitlab_pipeline
Use as a Dagger Module:
dagger install github.com/fluent-ci-templates/gitlab-pipeline@main
Call a function from the module:
dagger call release-create --src . \
--token env:GITLAB_ACCESS_TOKEN \
--tag v0.1.0
dagger call release-upload --src . \
--token env:GITLAB_ACCESS_TOKEN \
--tag v0.1.0 \
--file ./demo_v0.1.0_x86_64-unknown-linux-gnu.tar.gz
Variable | Description |
---|---|
TAG | Git tag to upload to |
FILE | File to upload |
GITLAB_ACCESS_TOKEN | Gitlab Access Token |
Job | Description |
---|---|
release_create | Creates a gitlab release |
release_upload | Uploads a file to a gitlab release |
releaseCreate(
src: string | Directory | undefined = ".",
token?: string | Secret,
tag?: string
): Promise<string>
releaseUpload(
src: string | Directory | undefined = ".",
token?: string,
tag?: string,
file?: string
): Promise<string>
You can also use this pipeline programmatically:
import { releaseCreate, releaseUpload } from "jsr:@fluentci/gitlab";
await releaseCreate();
await releaseUpload();
See tsiry.sndr/gitlab-release-demo for a working example.