name: Release Linux on: workflow_dispatch: inputs: tags: description: "Version tags" push: branches: [main] paths: - "share/const.go" jobs: release: strategy: matrix: go: [1.19.2] runs-on: "ubuntu-latest" steps: - name: Arm Build run: | sudo apt-get update sudo apt-get install -y libc6-armel-cross libc6-dev-armel-cross binutils-arm-linux-gnueabi libncurses5-dev build-essential bison flex libssl-dev bc sudo apt-get install -y gcc-arm-linux-gnueabi g++-arm-linux-gnueabi sudo apt-get install -y gcc-arm-linux-gnueabihf g++-arm-linux-gnueabihf sudo apt-get install -y g++-aarch64-linux-gnu crossbuild-essential-arm64 - name: Install coscmd run: sudo pip3 install coscmd - name: Install pnpm run: npm install -g pnpm - name: Setup Cache uses: actions/cache@v2 with: path: | ~/.cache/go-build ~/go/pkg/mod key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} restore-keys: | ${{ runner.os }}-go- - name: Checkout Kun uses: actions/checkout@v2 with: repository: yaoapp/kun path: kun - name: Checkout Xun uses: actions/checkout@v2 with: repository: yaoapp/xun path: xun - name: Checkout Gou uses: actions/checkout@v2 with: repository: yaoapp/gou path: gou - name: Checkout V8Go uses: actions/checkout@v2 with: repository: rogchap/v8go ref: 5e91d3d9dcabd2986f901b6b31590e49fc3c4dd8 path: v8go - name: Checkout XGen v0.9 uses: actions/checkout@v2 with: repository: yaoapp/xgen-deprecated path: xgen-v0.9 - name: Checkout XGen v1.0 uses: actions/checkout@v2 with: repository: yaoapp/xgen #ref: 5002c3fded585aaa69a4366135b415ea3234964e path: xgen-v1.0 - name: Move Kun, Xun, Gou, UI, V8Go run: | mv kun ../ mv xun ../ mv gou ../ mv v8go ../ mv xgen-v0.9 ../ mv xgen-v1.0 ../ ls -l . ls -l ../ - name: Checkout Code uses: actions/checkout@v2 - name: Setup Go ${{ matrix.go }} uses: actions/setup-go@v3 with: go-version: ${{ matrix.go }} - name: Setup Go Tools run: | make tools - name: Make Artifacts Linux run: | make artifacts-linux - name: Configure COS For Silicon Valley env: SECRET_ID: ${{ secrets.COS_ID }} SECRET_KEY: ${{ secrets.COS_KEY }} BUCKET: release-sv-1252011659 REGION: na-siliconvalley run: | coscmd config -a $SECRET_ID -s $SECRET_KEY -b $BUCKET -r $REGION - name: Push To Silicon Valley run: | for file in ./dist/release/*; do coscmd upload $file /archives/; done; - name: Archive production artifacts uses: actions/upload-artifact@v3 with: name: yao-linux path: | dist/release/* # - name: Configure COS For Beijing # env: # SECRET_ID: ${{ secrets.COS_ID }} # SECRET_KEY: ${{ secrets.COS_KEY }} # BUCKET: release-bj-1252011659 # REGION: ap-beijing # run: | # coscmd config -a $SECRET_ID -s $SECRET_KEY -b $BUCKET -r $REGION # - name: Push To Beijing # run: | # for file in ./dist/release/*; do coscmd upload $file /archives/; done;