mirror of
https://github.com/xjasonlyu/tun2socks.git
synced 2025-10-12 20:20:24 +08:00
adjust actions
This commit is contained in:
13
.github/workflows/docker.yml
vendored
13
.github/workflows/docker.yml
vendored
@@ -38,12 +38,23 @@ jobs:
|
|||||||
username: ${{ secrets.DOCKER_USERNAME }}
|
username: ${{ secrets.DOCKER_USERNAME }}
|
||||||
password: ${{ secrets.DOCKER_PASSWORD }}
|
password: ${{ secrets.DOCKER_PASSWORD }}
|
||||||
|
|
||||||
|
- name: Build and Push (dev)
|
||||||
|
if: github.ref == 'refs/heads/master'
|
||||||
|
uses: docker/build-push-action@v2
|
||||||
|
with:
|
||||||
|
context: .
|
||||||
|
push: true
|
||||||
|
platforms: linux/amd64,linux/arm64
|
||||||
|
tags: |
|
||||||
|
xjasonlyu/tun2socks:dev
|
||||||
|
|
||||||
- name: Get Version
|
- name: Get Version
|
||||||
id: shell
|
id: shell
|
||||||
run: |
|
run: |
|
||||||
echo ::set-output name=version::$(git describe --tags --abbrev=0)
|
echo ::set-output name=version::$(git describe --tags --abbrev=0)
|
||||||
|
|
||||||
- name: Build and Push
|
- name: Build and Push (latest)
|
||||||
|
if: startsWith(github.ref, 'refs/tags/')
|
||||||
uses: docker/build-push-action@v2
|
uses: docker/build-push-action@v2
|
||||||
with:
|
with:
|
||||||
context: .
|
context: .
|
||||||
|
3
.github/workflows/go.yml
vendored
3
.github/workflows/go.yml
vendored
@@ -45,9 +45,6 @@ jobs:
|
|||||||
|
|
||||||
- name: Build
|
- name: Build
|
||||||
if: startsWith(github.ref, 'refs/tags/')
|
if: startsWith(github.ref, 'refs/tags/')
|
||||||
env:
|
|
||||||
DIR: bin
|
|
||||||
NAME: tun2socks
|
|
||||||
run: make -j releases
|
run: make -j releases
|
||||||
|
|
||||||
- name: Upload Release
|
- name: Upload Release
|
||||||
|
2
Makefile
2
Makefile
@@ -4,7 +4,7 @@ NAME = "tun2socks"
|
|||||||
TAGS = ""
|
TAGS = ""
|
||||||
BUILD_FLAGS = "-v"
|
BUILD_FLAGS = "-v"
|
||||||
|
|
||||||
VERSION = $(shell git describe --tags --abbrev=0 || echo "unknown version")
|
VERSION = $(shell git describe --tags || echo "unknown version")
|
||||||
BUILD_TIME = $(shell date -u '+%FT%TZ')
|
BUILD_TIME = $(shell date -u '+%FT%TZ')
|
||||||
|
|
||||||
LDFLAGS += -w -s -buildid=
|
LDFLAGS += -w -s -buildid=
|
||||||
|
Reference in New Issue
Block a user