isx clone代码的时候,如果用户没有fork,需要提醒用户先fork代码,并给出快捷链接 #73
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: release project | |
on: | |
issues: | |
types: | |
- closed | |
jobs: | |
package: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout isx-cli | |
uses: actions/checkout@v4 | |
with: | |
token: ${{ secrets.ADMIN_GITHUB_TOKEN }} | |
repository: "isxcode/isx-cli" | |
ref: 'main' | |
- name: Cache go modules | |
uses: actions/cache@v3 | |
with: | |
path: | | |
~/.cache/go-build | |
~/go/pkg/mod | |
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} | |
restore-keys: | | |
${{ runner.os }}-go- | |
- name: Setup go env | |
uses: actions/[email protected] | |
with: | |
go-version-file: './go.mod' | |
- name: Install go modules | |
run: | | |
go env -w GO111MODULE=auto | |
go mod tidy | |
go install | |
- name: isx_windows_amd64 | |
run: CGO_ENABLED=0 GOOS=windows GOARCH=amd64 go build -o ./target/isx_windows_amd64.exe main.go | |
- name: isx_linux_amd64 | |
run: CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -o ./target/isx_linux_amd64 main.go | |
- name: isx_darwin_arm64 | |
run: CGO_ENABLED=0 GOOS=darwin GOARCH=arm64 go build -o ./target/isx_darwin_arm64 main.go | |
- name: isx_darwin_amd64 | |
run: CGO_ENABLED=0 GOOS=darwin GOARCH=amd64 go build -o ./target/isx_darwin_amd64 main.go | |
- name: Upload Package to Ali oss | |
uses: chf007/aliyun-oss-upload-action@main | |
env: | |
OSS_ACCESS_KEY_ID: ${{ secrets.ALI_OSS_KEY_ID }} | |
OSS_ACCESS_KEY_SECRET: ${{ secrets.ALI_OSS_KEY_SECRET }} | |
with: | |
region: oss-cn-shanghai | |
bucket: isxcode | |
source-dir: 'target' | |
dest-dir: 'zhixingyun' |