Skip to content

Commit

Permalink
chore: update stuff
Browse files Browse the repository at this point in the history
  • Loading branch information
Futrime committed Feb 8, 2024
1 parent 176e9d9 commit edf340b
Show file tree
Hide file tree
Showing 13 changed files with 938 additions and 49 deletions.
45 changes: 45 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: Bug Report
description: Create a report to help us improve
title: "[Bug]: "
labels: ["bug"]
body:
- type: textarea
attributes:
label: Describe the bug
description: A clear and concise description of what the bug is.
validations:
required: true

- type: textarea
attributes:
label: To Reproduce
description: Steps to reproduce the behavior.
validations:
required: true

- type: textarea
attributes:
label: Expected behavior
description: A clear and concise description of what you expected to happen.
validations:
required: true

- type: textarea
attributes:
label: Screenshots
description: If applicable, add screenshots to help explain your problem.

- type: input
attributes:
label: Platform
description: The platform you are using. (e.g. Windows 10, macOS 10.15, Ubuntu 20.04)

- type: input
attributes:
label: Version
description: The version of the application you are using. (e.g. 1.0.0)

- type: textarea
attributes:
label: Additional context
description: Add any other context about the problem here.
28 changes: 28 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Feature request
description: Suggest an idea for this project
title: "[Feature]: "
labels: ["enhancement"]
body:
- type: textarea
attributes:
label: Is your feature request related to a problem? Please describe.
description: A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
validations:
required: true

- type: textarea
attributes:
label: Describe the solution you'd like
description: A clear and concise description of what you want to happen.
validations:
required: true

- type: textarea
attributes:
label: Describe alternatives you've considered
description: A clear and concise description of any alternative solutions or features you've considered.

- type: textarea
attributes:
label: Additional context
description: Add any other context or screenshots about the feature request here.
18 changes: 18 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
## What does this PR do?



## Which issues does this PR resolve?



## Checklist before merging

Thank you for your contribution to the repository.
Before submitting this PR, please make sure:

- [ ] Your code builds clean without any errors or warnings
- [ ] Your code follows [Google Go Style Guide](https://google.github.io/styleguide/go/)
- [ ] You have tested all functions
- [ ] You have not used code without license
- [ ] You have added statement for third-party code
12 changes: 12 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# To get started with Dependabot version updates, you'll need to specify which
# package ecosystems to update and where the package manifests are located.
# Please see the documentation for all configuration options:
# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates

version: 2
updates:
- package-ecosystem: "gomod" # See documentation for possible values
directory: "" # Location of package manifests
schedule:
interval: "daily"

8 changes: 4 additions & 4 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,17 +13,17 @@ jobs:
steps:
- uses: actions/checkout@v4

- uses: actions/setup-go@v4
- uses: actions/setup-go@v5
with:
go-version: '^1.21.5'
cache: true

- name: Build
run: |
export GOOS=${{ matrix.GOOS }}
export GOARCH=${{ matrix.GOARCH }}
go build -ldflags "-s -w" -o bin/ github.com/liteldev/bdsdown
- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
with:
name: ${{ matrix.GOOS }}-${{ matrix.GOARCH }}
name: bdsdown-${{ matrix.GOOS }}-${{ matrix.GOARCH }}-${{ github.sha }}
path: bin
76 changes: 76 additions & 0 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
# For most projects, this workflow file will not need changing; you simply need
# to commit it to your repository.
#
# You may wish to alter this file to override the set of languages analyzed,
# or to provide custom queries or build logic.
#
# ******** NOTE ********
# We have attempted to detect the languages in your repository. Please check
# the `language` matrix defined below to confirm you have the correct set of
# supported CodeQL languages.
#
name: "CodeQL"

on:
push:
branches: [ main ]
pull_request:
# The branches below must be a subset of the branches above
branches: [ main ]
schedule:
- cron: '36 13 * * 6'

jobs:
analyze:
name: Analyze
runs-on: ubuntu-latest
permissions:
actions: read
contents: read
security-events: write

strategy:
fail-fast: false
matrix:
language: [ 'go' ]
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby' ]
# Use only 'java' to analyze code written in Java, Kotlin or both
# Use only 'javascript' to analyze code written in JavaScript, TypeScript or both
# Learn more about CodeQL language support at https://aka.ms/codeql-docs/language-support

steps:
- name: Checkout repository
uses: actions/checkout@v3

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v2
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
# By default, queries listed here will override any specified in a config file.
# Prefix the list here with "+" to use these queries and those in the config file.

# Details on CodeQL's query packs refer to : https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs
# queries: security-extended,security-and-quality


# Autobuild attempts to build any compiled languages (C/C++, C#, Go, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@v2

# ℹ️ Command-line programs to run using the OS shell.
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun

# If the Autobuild fails above, remove it and uncomment the following three lines.
# modify them (or add more) to build your code if your project, please refer to the EXAMPLE below for guidance.

# - run: |
# echo "Run, Build Application using script"
# ./location_of_script_within_repo/buildscript.sh

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2
with:
category: "/language:${{matrix.language}}"
49 changes: 32 additions & 17 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,6 @@ on:
types:
- published

permissions:
contents: write

jobs:
build:
runs-on: ubuntu-latest
Expand All @@ -16,67 +13,85 @@ jobs:
steps:
- uses: actions/checkout@v4

- uses: actions/setup-go@v4
- uses: actions/setup-go@v5
with:
go-version: '^1.21.5'
cache: true

- name: Build
run: |
export GOOS=${{ matrix.GOOS }}
export GOARCH=${{ matrix.GOARCH }}
go build -ldflags "-s -w" -o bin/ github.com/liteldev/bdsdown
- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
with:
name: ${{ matrix.GOOS }}-${{ matrix.GOARCH }}
name: bdsdown-${{ matrix.GOOS }}-${{ matrix.GOARCH }}-${{ github.sha }}
path: bin

update-release-notes:
permissions:
contents: write
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Validate release stuff (tooth.json, CHANGELOG.md, etc.)
run: |
npm i -g keep-a-changelog
python scripts/validate_release.py --tag ${{ github.event.release.tag_name }}
- id: extract-release-notes
uses: ffurrer2/extract-release-notes@v2

- uses: softprops/action-gh-release@v1
with:
body: ${{ steps.extract-release-notes.outputs.release_notes }}

upload-to-release:
needs:
- build
- update-release-notes
permissions:
contents: write
runs-on: ubuntu-latest
strategy:
matrix:
GOOS: [darwin, linux, windows]
GOARCH: [amd64, arm64]
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- uses: actions/download-artifact@v3
- uses: actions/download-artifact@v4
with:
name: ${{ matrix.GOOS }}-${{ matrix.GOARCH }}
name: bdsdown-${{ matrix.GOOS }}-${{ matrix.GOARCH }}-${{ github.sha }}
path: artifact

- name: Copy essential files
run: |
cp CHANGELOG.md LICENSE README.md artifact/
cp CHANGELOG.md COPYING README.md artifact/
- name: Pack artifact (Windows)
if: matrix.GOOS == 'windows'
run: |
cd artifact
zip -r ../bdsdown-${{ matrix.GOOS }}-${{ matrix.GOARCH }}.zip *
cd ..
working-directory: artifact

- name: Pack artifact (Others)
if: matrix.GOOS != 'windows'
run: |
cd artifact
tar -czvf ../bdsdown-${{ matrix.GOOS }}-${{ matrix.GOARCH }}.tar.gz *
cd ..
working-directory: artifact

- name: Upload artifact to release (Windows)
if: matrix.GOOS == 'windows'
uses: softprops/action-gh-release@v1
with:
append_body: true
files: |
bdsdown-${{ matrix.GOOS }}-${{ matrix.GOARCH }}.zip
- name: Upload artifact to release (Others)
if: matrix.GOOS != 'windows'
uses: softprops/action-gh-release@v1
with:
append_body: true
files: |
bdsdown-${{ matrix.GOOS }}-${{ matrix.GOARCH }}.tar.gz
28 changes: 27 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,27 @@
*.exe
## Go.gitignore
# If you prefer the allow list template instead of the deny list, see community template:
# https://github.com/github/gitignore/blob/main/community/Golang/Go.AllowList.gitignore
#
# Binaries for programs and plugins
*.exe
*.exe~
*.dll
*.so
*.dylib

# Test binary, built with `go test -c`
*.test

# Output of the go coverage tool, specifically when used with LiteIDE
*.out

# Dependency directories (remove the comment below to include it)
# vendor/

# Go workspace file
go.work


## Repository specific
.vscode/
bin/
3 changes: 0 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [Unreleased]

## [0.4.0] - 2023-12-25

### Added
Expand Down Expand Up @@ -44,7 +42,6 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

- Basic functionality

[unreleased]: https://github.com/LiteLDev/bdsdown/compare/v0.4.0...HEAD
[0.4.0]: https://github.com/LiteLDev/bdsdown/compare/v0.3.1...v0.4.0
[0.3.1]: https://github.com/LiteLDev/bdsdown/compare/v0.3.0...v0.3.1
[0.3.0]: https://github.com/LiteLDev/bdsdown/compare/v0.2.0...v0.3.0
Expand Down
Loading

0 comments on commit edf340b

Please sign in to comment.