diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml index 5849b8c..2b25054 100644 --- a/.github/workflows/go.yml +++ b/.github/workflows/go.yml @@ -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: @@ -10,7 +14,6 @@ on: branches: [ "master" ] jobs: - build: runs-on: ubuntu-latest steps: @@ -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 ./... diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..fde9e60 --- /dev/null +++ b/.github/workflows/release.yml @@ -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 diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 0000000..ed479b4 --- /dev/null +++ b/CHANGELOG.md @@ -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 diff --git a/config/config.go b/config/config.go index d08062a..ec0fc51 100644 --- a/config/config.go +++ b/config/config.go @@ -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"