Skip to content

Commit 83bc823

Browse files
committed
Configured automatic release
1 parent 9b179d7 commit 83bc823

File tree

3 files changed

+168
-0
lines changed

3 files changed

+168
-0
lines changed

.github/workflows/release.yaml

+34
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: Release
2+
3+
on:
4+
push:
5+
tags:
6+
- 'v*.*.*'
7+
8+
jobs:
9+
release:
10+
permissions:
11+
contents: write
12+
runs-on: ubuntu-latest
13+
steps:
14+
- name: Checkout repository
15+
uses: actions/checkout@v4
16+
with:
17+
fetch-depth: 0
18+
19+
- name: Install
20+
uses: actions/setup-go@v5
21+
with:
22+
go-version: 'stable'
23+
24+
- name: Extract Version
25+
run: echo "APP_VERSION=${GITHUB_REF_NAME#v}" >> "$GITHUB_ENV"
26+
27+
- name: Release
28+
uses: goreleaser/goreleaser-action@v6
29+
env:
30+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
31+
with:
32+
distribution: goreleaser
33+
version: 'latest'
34+
args: release --clean

.goreleaser.yaml

+56
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
# yaml-language-server: $schema=https://goreleaser.com/static/schema.json
2+
3+
version: 2
4+
5+
builds:
6+
- ldflags:
7+
- '-s'
8+
- '-w'
9+
- '-X "github.com/bilbilak/treegen/config.Version={{.Env.APP_VERSION}}"'
10+
env:
11+
- CGO_ENABLED=0
12+
goos:
13+
- windows
14+
- linux
15+
- darwin
16+
- freebsd
17+
goarch:
18+
- 386
19+
- arm
20+
- amd64
21+
- arm64
22+
- ppc64le
23+
- riscv64
24+
goarm:
25+
- 6
26+
- 7
27+
ignore:
28+
- goos: darwin
29+
goarch: arm
30+
- goos: windows
31+
goarch: arm
32+
33+
archives:
34+
- format: binary
35+
name_template: >-
36+
{{ .ProjectName }}_
37+
{{- title .Os }}_
38+
{{- if eq .Arch "amd64" }}x86_64
39+
{{- else if eq .Arch "386" }}i386
40+
{{- else }}{{ .Arch }}{{ end }}
41+
{{- if .Arm }}v{{ .Arm }}{{ end }}
42+
43+
nfpms:
44+
- license: GPL-3.0
45+
vendor: Bilbilak
46+
maintainer: The Artifex (4r7if3x)
47+
homepage: https://github.com/bilbilak/treegen
48+
description: ASCII Tree Directory and File Structure Generator
49+
section: utils
50+
formats:
51+
- deb
52+
- rpm
53+
- archlinux
54+
contents:
55+
- src: treegen.1
56+
dst: /usr/local/share/man/man1/

treegen.1

+78
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
.TH TREEGEN 1 "December 2024" "Version 1.1" "TreeGen Manual"
2+
.SH NAME
3+
TreeGen - ASCII Tree Directory and File Structure Generator
4+
.SH SYNOPSIS
5+
.B treegen
6+
[options] | [FILE]... [STDIN]
7+
.SH DESCRIPTION
8+
TreeGen is a powerful Command Line Interface (CLI) tool designed to simplify the process of creating complex directory structures. It allows users to generate an entire file and folder structure from an ASCII tree representation. This can be incredibly useful for quickly setting up projects or replicating folder structures.
9+
10+
.SH OPTIONS
11+
.TP
12+
.B -f, --force
13+
Overwrite existing files.
14+
.TP
15+
.B -v, --verbose
16+
Enable verbose output.
17+
.TP
18+
.B --version
19+
Display the installed version number.
20+
.TP
21+
.B --license
22+
Display the license name.
23+
.TP
24+
.B --help
25+
Show usage instructions of treegen or its commands.
26+
27+
.SH EXAMPLES
28+
.PP
29+
Load tree structures from files:
30+
.PP
31+
.EX
32+
.B treegen tree1.txt tree2.txt
33+
.EE
34+
.PP
35+
Load tree structures from the output of other commands:
36+
.PP
37+
.EX
38+
.B cat tree.txt | treegen
39+
.EE
40+
.PP
41+
Load tree structures from input redirection:
42+
.PP
43+
.EX
44+
.B treegen < tree.txt
45+
.EE
46+
.PP
47+
Load tree structures from both file and heredoc:
48+
.PP
49+
.EX
50+
.B treegen tree.txt <<-EOF
51+
.B ...
52+
.B EOF
53+
.EE
54+
55+
.SH EXIT STATUS
56+
.TP
57+
.B 0
58+
Success.
59+
.TP
60+
.B 1
61+
General error.
62+
.TP
63+
.B 2
64+
Invalid arguments or wrong syntax.
65+
66+
.SH AUTHOR
67+
Written by The Artifex (4r7if3x).
68+
69+
.SH REPORTING BUGS
70+
Report bugs to https://github.com/bilbilak/treegen/issues.
71+
72+
.SH COPYRIGHT
73+
Copyright © 2024 The Artifex (4r7if3x)
74+
75+
Licensed under General Public License version 3 (GPLv3)
76+
77+
.SH SEE ALSO
78+
.BR ls (1), tree (1), find (1), mkdir (1), touch (1)

0 commit comments

Comments
 (0)