Skip to content

Commit

Permalink
Release to chocolatey
Browse files Browse the repository at this point in the history
  • Loading branch information
robinovitch61 committed Jan 15, 2024
1 parent 2d2c8ea commit 69e4251
Show file tree
Hide file tree
Showing 4 changed files with 44 additions and 4 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ name: build
on:
pull_request:
push:
workflow_dispatch:

jobs:
goreleaser:
Expand All @@ -27,3 +28,4 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
HOMEBREW_TAP_GITHUB_TOKEN: ${{ secrets.HOMEBREW_TAP_GITHUB_TOKEN }}
CHOCOLATEY_API_KEY: ${{ secrets.CHOCOLATEY_API_KEY }}
23 changes: 19 additions & 4 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,14 @@ on:
create:
tags:
- v*
workflow_dispatch:

permissions:
contents: write

env:
CHOCOLATEY_VERSION: 2.2.2

jobs:
goreleaser:
runs-on: ubuntu-latest
Expand All @@ -16,8 +20,20 @@ jobs:
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Install Nix
uses: cachix/install-nix-action@v23
- name: Install Snapcraft & Chocolatey
# from https://github.com/twpayne/chezmoi/blob/5293b40b48e678c461d68d06b635010173cac970/.github/workflows/main.yml#L154C1-L167C38
run: |
sudo apt-get --quiet update
sudo apt-get --no-install-suggests --no-install-recommends --quiet --yes install musl-tools snapcraft
# https://github.com/goreleaser/goreleaser/issues/1715
# https://bugs.launchpad.net/snapcraft/+bug/1889741
mkdir -p "${HOME}/.cache/snapcraft/download"
mkdir -p "${HOME}/.cache/snapcraft/stage-packages"
mkdir -p /opt/chocolatey
wget -q -O - "https://github.com/chocolatey/choco/releases/download/${CHOCOLATEY_VERSION}/chocolatey.v${CHOCOLATEY_VERSION}.tar.gz" | tar -xz -C "/opt/chocolatey"
echo '#!/bin/bash' >> /usr/local/bin/choco
echo 'mono /opt/chocolatey/choco.exe $@' >> /usr/local/bin/choco
chmod +x /usr/local/bin/choco
- name: Set up Go
uses: actions/setup-go@v4
with:
Expand All @@ -31,5 +47,4 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
HOMEBREW_TAP_GITHUB_TOKEN: ${{ secrets.HOMEBREW_TAP_GITHUB_TOKEN }}
AUR_KEY: ${{ secrets.AUR_KEY }}
NUR_PACKAGES_GITHUB_TOKEN: ${{ secrets.NUR_PACKAGES_GITHUB_TOKEN }}
CHOCOLATEY_API_KEY: ${{ secrets.CHOCOLATEY_API_KEY }}
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,5 @@
*.jpeg
*.pdf
.DS_Store
webtoon-dl
opt
21 changes: 21 additions & 0 deletions .goreleaser.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,27 @@ brews:
name: homebrew-tap
branch: main
token: "{{ .Env.HOMEBREW_TAP_GITHUB_TOKEN }}"

chocolateys:
- owners: "Leo Robinovitch"
authors: "Leo Robinovitch"
project_url: https://github.com/robinovitch61/webtoon-dl
url_template: "https://github.com/robinovitch61/webtoon-dl/releases/download/{{ .Tag }}/{{ .ArtifactName }}"
license_url: https://github.com/robinovitch61/webtoon-dl/blob/main/LICENSE
require_license_acceptance: false
project_source_url: https://github.com/robinovitch61/webtoon-dl
docs_url: https://github.com/robinovitch61/webtoon-dl/blob/main/README.md
bug_tracker_url: https://github.com/robinovitch61/webtoon-dl/issues
tags: "webtoon webtoon-dl comics manga"
summary: "A cli for downloading content from webtoon.com"
description: |
# A cli for downloading content from webtoon.com
Download webtoon comics as PDFs using a terminal/command line.
release_notes: "https://github.com/robinovitch61/webtoon-dl/releases/tag/v{{ .Version }}"
api_key: "{{ .Env.CHOCOLATEY_API_KEY }}"
source_repo: "https://push.chocolatey.org/"
skip_publish: false

gomod:
proxy: true

0 comments on commit 69e4251

Please sign in to comment.