mirror of
https://github.com/bestnite/sub2clash.git
synced 2025-10-26 01:01:35 +00:00
workflow
This commit is contained in:
4
.github/workflows/docker.yml
vendored
4
.github/workflows/docker.yml
vendored
@@ -45,7 +45,7 @@ jobs:
|
|||||||
password: ${{ secrets.GITHUB_TOKEN }}
|
password: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|
||||||
- name: Build and push
|
- name: Build and push
|
||||||
uses: docker/build-push-action@v5
|
uses: docker/build-push-action@v6
|
||||||
with:
|
with:
|
||||||
build-args: |
|
build-args: |
|
||||||
"version=${{ github.ref_name }}"
|
"version=${{ github.ref_name }}"
|
||||||
@@ -53,3 +53,5 @@ jobs:
|
|||||||
tags: ${{ steps.meta.outputs.tags }}
|
tags: ${{ steps.meta.outputs.tags }}
|
||||||
labels: ${{ steps.meta.outputs.labels }}
|
labels: ${{ steps.meta.outputs.labels }}
|
||||||
platforms: linux/amd64,linux/arm64,linux/arm/v7
|
platforms: linux/amd64,linux/arm64,linux/arm/v7
|
||||||
|
file: Containerfile
|
||||||
|
|
||||||
|
|||||||
11
.github/workflows/release.yml
vendored
11
.github/workflows/release.yml
vendored
@@ -13,13 +13,18 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v5
|
||||||
|
|
||||||
- name: Set up Go
|
- name: Set up Go
|
||||||
uses: actions/setup-go@v4
|
uses: actions/setup-go@v5
|
||||||
|
|
||||||
|
- name: Install UPX
|
||||||
|
uses: crazy-max/ghaction-upx@v3
|
||||||
|
with:
|
||||||
|
install-only: true
|
||||||
|
|
||||||
- name: Run GoReleaser
|
- name: Run GoReleaser
|
||||||
uses: goreleaser/goreleaser-action@v5
|
uses: goreleaser/goreleaser-action@v6
|
||||||
with:
|
with:
|
||||||
distribution: goreleaser
|
distribution: goreleaser
|
||||||
version: latest
|
version: latest
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
version: 2
|
||||||
project_name: sub2clash
|
project_name: sub2clash
|
||||||
builds:
|
builds:
|
||||||
- env:
|
- env:
|
||||||
@@ -9,19 +10,15 @@ builds:
|
|||||||
goarch:
|
goarch:
|
||||||
- amd64
|
- amd64
|
||||||
- arm64
|
- arm64
|
||||||
- arm
|
|
||||||
- "386"
|
- "386"
|
||||||
goarm:
|
|
||||||
- "6"
|
|
||||||
- "7"
|
|
||||||
ldflags:
|
ldflags:
|
||||||
- -s -w -X sub2clash/constant.Version={{ .Version }}
|
- -s -w -X github.com/bestnite/sub2clash/constant.Version={{ .Version }}
|
||||||
flags:
|
flags:
|
||||||
- -trimpath
|
- -trimpath
|
||||||
archives:
|
archives:
|
||||||
- format: tar.gz
|
- formats: ["tar.gz"]
|
||||||
format_overrides:
|
format_overrides:
|
||||||
- format: zip
|
- formats: ["zip"]
|
||||||
goos: windows
|
goos: windows
|
||||||
wrap_in_directory: true
|
wrap_in_directory: true
|
||||||
files:
|
files:
|
||||||
@@ -30,3 +27,19 @@ archives:
|
|||||||
- templates
|
- templates
|
||||||
release:
|
release:
|
||||||
draft: true
|
draft: true
|
||||||
|
upx:
|
||||||
|
- enabled: true
|
||||||
|
compress: best
|
||||||
|
nfpms:
|
||||||
|
- id: sub2clash
|
||||||
|
homepage: https://github.com/bestnite/sub2clash
|
||||||
|
maintainer: Nite <admin@nite07.com>
|
||||||
|
license: "MIT"
|
||||||
|
formats:
|
||||||
|
- apk
|
||||||
|
- deb
|
||||||
|
- rpm
|
||||||
|
- termux.deb
|
||||||
|
- archlinux
|
||||||
|
provides:
|
||||||
|
- sub2clash
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
FROM golang:1.21-alpine as builder
|
FROM golang:1.25 as builder
|
||||||
LABEL authors="nite07"
|
LABEL authors="nite07"
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
COPY . .
|
COPY . .
|
||||||
Reference in New Issue
Block a user