mirror of
https://github.com/Finesssee/ProxyPilot.git
synced 2026-11-20 12:23:26 +00:00
chore: remove ppswitch workflows
This commit is contained in:
@@ -1,31 +0,0 @@
|
||||
name: Publish ppswitch via Bun
|
||||
|
||||
on:
|
||||
workflow_run:
|
||||
workflows: ["PPSwitch Release"]
|
||||
types:
|
||||
- completed
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
publish:
|
||||
runs-on: ubuntu-latest
|
||||
if: ${{ github.event_name == 'workflow_dispatch' || github.event.workflow_run.conclusion == 'success' }}
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Setup Bun
|
||||
uses: oven-sh/setup-bun@v2
|
||||
with:
|
||||
bun-version: latest
|
||||
|
||||
- name: Setup registry auth
|
||||
working-directory: bun/ppswitch
|
||||
run: echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}" > .npmrc
|
||||
|
||||
- name: Publish package
|
||||
working-directory: bun/ppswitch
|
||||
run: bun publish --access public
|
||||
env:
|
||||
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
|
||||
@@ -1,80 +0,0 @@
|
||||
name: PPSwitch Release
|
||||
|
||||
on:
|
||||
push:
|
||||
tags:
|
||||
- 'ppswitch-v*'
|
||||
|
||||
permissions:
|
||||
contents: write
|
||||
|
||||
jobs:
|
||||
build:
|
||||
name: Build ${{ matrix.os }}-${{ matrix.arch }}
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
matrix:
|
||||
include:
|
||||
- os: darwin
|
||||
arch: amd64
|
||||
extension: ''
|
||||
- os: darwin
|
||||
arch: arm64
|
||||
extension: ''
|
||||
- os: linux
|
||||
arch: amd64
|
||||
extension: ''
|
||||
- os: linux
|
||||
arch: arm64
|
||||
extension: ''
|
||||
- os: windows
|
||||
arch: amd64
|
||||
extension: '.exe'
|
||||
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Set up Go
|
||||
uses: actions/setup-go@v5
|
||||
with:
|
||||
go-version: '1.21'
|
||||
|
||||
- name: Build binary
|
||||
env:
|
||||
GOOS: ${{ matrix.os }}
|
||||
GOARCH: ${{ matrix.arch }}
|
||||
CGO_ENABLED: 0
|
||||
run: |
|
||||
go build -ldflags="-s -w" -o ppswitch-${{ matrix.os }}-${{ matrix.arch }}${{ matrix.extension }} ./cmd/ppswitch
|
||||
|
||||
- name: Upload artifact
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: ppswitch-${{ matrix.os }}-${{ matrix.arch }}
|
||||
path: ppswitch-${{ matrix.os }}-${{ matrix.arch }}${{ matrix.extension }}
|
||||
|
||||
release:
|
||||
name: Create Release
|
||||
needs: build
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Download all artifacts
|
||||
uses: actions/download-artifact@v4
|
||||
with:
|
||||
path: artifacts
|
||||
|
||||
- name: Prepare release assets
|
||||
run: |
|
||||
mkdir -p release
|
||||
find artifacts -type f -exec cp {} release/ \;
|
||||
ls -la release/
|
||||
|
||||
- name: Create GitHub Release
|
||||
uses: softprops/action-gh-release@v2
|
||||
with:
|
||||
files: release/*
|
||||
generate_release_notes: true
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
Reference in New Issue
Block a user