mirror of
https://github.com/XTLS/Xray-core.git
synced 2024-11-22 23:13:01 +00:00
CI: not create zip file when not releasing
Makefile: remove unneccesary `install` target & Add build to `.PHONY` target
This commit is contained in:
parent
3654c0d710
commit
f0cb292dc6
7
.github/workflows/release.yml
vendored
7
.github/workflows/release.yml
vendored
@ -17,14 +17,14 @@ on:
|
|||||||
- "**/*.go"
|
- "**/*.go"
|
||||||
- "go.mod"
|
- "go.mod"
|
||||||
- "go.sum"
|
- "go.sum"
|
||||||
- ".github/workflows/*.yml"
|
- ".github/workflows/release.yml"
|
||||||
pull_request:
|
pull_request:
|
||||||
types: [opened, synchronize, reopened]
|
types: [opened, synchronize, reopened]
|
||||||
paths:
|
paths:
|
||||||
- "**/*.go"
|
- "**/*.go"
|
||||||
- "go.mod"
|
- "go.mod"
|
||||||
- "go.sum"
|
- "go.sum"
|
||||||
- ".github/workflows/*.yml"
|
- ".github/workflows/release.yml"
|
||||||
jobs:
|
jobs:
|
||||||
prepare:
|
prepare:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
@ -183,7 +183,7 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
mkdir -p build_assets
|
mkdir -p build_assets
|
||||||
make
|
make
|
||||||
find . -maxdepth 1 -type f -regex '.*\(wxray\|xray\|xray_softfloat\)\(\|.exe\)' -exec mv {} ./build_assets/ \;
|
find . -maxdepth 1 -type f -regex './\(wxray\|xray\|xray_softfloat\)\(\|.exe\)' -exec mv {} ./build_assets/ \;
|
||||||
|
|
||||||
- name: Restore Cache
|
- name: Restore Cache
|
||||||
uses: actions/cache/restore@v4
|
uses: actions/cache/restore@v4
|
||||||
@ -198,6 +198,7 @@ jobs:
|
|||||||
cp ${GITHUB_WORKSPACE}/LICENSE ./build_assets/LICENSE
|
cp ${GITHUB_WORKSPACE}/LICENSE ./build_assets/LICENSE
|
||||||
|
|
||||||
- name: Create ZIP archive
|
- name: Create ZIP archive
|
||||||
|
if: github.event_name == 'release'
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
pushd build_assets || exit 1
|
pushd build_assets || exit 1
|
||||||
|
5
Makefile
5
Makefile
@ -26,15 +26,12 @@ endif
|
|||||||
ifeq ($(shell echo "$(GOARCH)" | grep -Eq "(mips|mipsle)" && echo true),true) #
|
ifeq ($(shell echo "$(GOARCH)" | grep -Eq "(mips|mipsle)" && echo true),true) #
|
||||||
ADDITION = GOMIPS=softfloat go build -o $(NAME)_softfloat -trimpath -ldflags "$(LDFLAGS)" -v $(MAIN)
|
ADDITION = GOMIPS=softfloat go build -o $(NAME)_softfloat -trimpath -ldflags "$(LDFLAGS)" -v $(MAIN)
|
||||||
endif
|
endif
|
||||||
.PHONY: clean
|
.PHONY: clean build
|
||||||
|
|
||||||
build:
|
build:
|
||||||
go build -o $(OUTPUT) $(PARAMS) $(MAIN)
|
go build -o $(OUTPUT) $(PARAMS) $(MAIN)
|
||||||
$(ADDITION)
|
$(ADDITION)
|
||||||
|
|
||||||
install:
|
|
||||||
go build -o $(PREFIX)/bin/$(OUTPUT) $(PARAMS) $(MAIN)
|
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
go clean -v -i $(PWD)
|
go clean -v -i $(PWD)
|
||||||
rm -f xray xray.exe wxray.exe xray_softfloat
|
rm -f xray xray.exe wxray.exe xray_softfloat
|
||||||
|
Loading…
Reference in New Issue
Block a user