Skip to content

Commit

Permalink
ci(release) : add release.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
LordPax committed Apr 16, 2024
1 parent 89faae3 commit a237a4b
Show file tree
Hide file tree
Showing 4 changed files with 81 additions and 12 deletions.
19 changes: 8 additions & 11 deletions .github/workflows/go.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
# This workflow will build a golang project
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-go

name: Go
name: Build and Test

permissions:
contents: write
discussions: write

on:
push:
Expand All @@ -10,7 +14,6 @@ on:
branches: [ "master" ]

jobs:

build:
runs-on: ubuntu-latest
steps:
Expand All @@ -24,12 +27,6 @@ jobs:
- name: Build
run: go build -v ./...

- name: Go Release Binaries
uses: softprops/action-gh-release@v1
with:
token: ${{ secrets.TOKEN }}
release_name: ${{ github.event.head_commit.message }}
tag: ${{ github.ref }}
body: ${{ github.event.head_commit.message }}
draft: false
prerelease: false
# when i will have tests
# - name: Test
# run: go test -v ./...
55 changes: 55 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
name: Build and Test

permissions:
contents: write

on:
push:
tags:
- 'v*'

jobs:
build:
strategy:
matrix:
os: [ ubuntu-latest, windows-latest, macOS-latest ]
arch: [ amd64, arm64, i386 ]

exclude:
- os: windows-latest
arch: arm64
- os: windows-latest
arch: i386

runs-on: ${{ matrix.os }}

steps:
- uses: actions/checkout@v3

- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: '1.22.2'

- name: Install dependencies
run: go get .

- name: Build
run: go build -v ./...

- name: Archive
run: |
tar -czf scan2epub-${{ matrix.os }}-${{ matrix.arch }}-${{ github.ref }}.tar.gz scan2epub README.md install.sh
- name: Release
uses: softprops/action-gh-release@v2
env:
GITHUB_TOKEN: ${{ secrets.TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: Release ${{ github.ref }}
body_path: CHANGELOG.md
draft: false
prerelease: false
files: |
scan2epub-${{ matrix.os }}-${{ matrix.arch }}-${{ github.ref }}.tar.gz
17 changes: 17 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Changelog

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.1.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [1.0.0] - 2024-04-16

### Added

* Add command conv to convert pages to EPUB file
* Add command exist to check if a manga exists
* Add this changelog
* Download pages of manga
* Convert pages to EPUB file
* Rotate image when needed
2 changes: 1 addition & 1 deletion config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ var home, _ = os.UserHomeDir()

var (
NAME = "scan2epub"
VERSION = "0.1.0"
VERSION = "1.0.0"
USAGE = "CLI tool to convert scan to epub"
CONFIG_DIR = home + "/.config/scan2epub"
CONFIG_FILE = CONFIG_DIR + "/config"
Expand Down

0 comments on commit a237a4b

Please sign in to comment.