diff --git a/.github/workflows/beta_release.yml b/.github/workflows/beta_release.yml index 55abb02e..d83d5026 100644 --- a/.github/workflows/beta_release.yml +++ b/.github/workflows/beta_release.yml @@ -5,7 +5,7 @@ on: branches: [ 'main' ] jobs: - release: + changelog: strategy: matrix: platform: [ ubuntu-latest ] @@ -23,14 +23,60 @@ jobs: run: | git tag -l npx changelogen@latest --output CHANGELOG.md -# env: -# GITHUB_TOKEN: ${{secrets.MY_TOKEN}} - - name: Prerelease - uses: tubone24/update_release@master - env: - GITHUB_TOKEN: ${{ secrets.MY_TOKEN }} - TAG_NAME: beta + - name: Upload assets + uses: softprops/action-gh-release@v2 with: + body_path: CHANGELOG.md + files: CHANGELOG.md prerelease: true - body_path: CHANGELOG.md \ No newline at end of file + tag_name: beta + + release: + needs: + - changelog + strategy: + matrix: + include: + - target: '!(*musl*|*windows-arm64*|*android*)' # xgo + hash: "md5" + - target: 'linux-*-musl*' #musl + hash: "md5-linux-musl" + - target: 'windows-arm64' #win-arm64 + hash: "md5-windows-arm64" + - target: 'android-*' #android + hash: "md5-android" + name: Beta Release + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + with: + fetch-depth: 0 + + - name: Setup Go + uses: actions/setup-go@v5 + with: + go-version: '1.22' + + - name: Setup web + run: bash build.sh dev web + + - name: Build + id: test-action + uses: go-cross/cgo-actions@v1 + with: + targets: ${{ matrix.target }} + musl-target-format: $os-$musl-$arch + out-dir: build + + - name: Compress + run: | + bash build.sh zip ${{ matrix.hash }} + + - name: Upload assets + uses: softprops/action-gh-release@v2 + with: + files: build/compress/* + prerelease: true + tag_name: beta \ No newline at end of file diff --git a/build.sh b/build.sh index 9d0f4174..5a7d0d66 100644 --- a/build.sh +++ b/build.sh @@ -267,6 +267,8 @@ if [ "$1" = "dev" ]; then BuildDocker elif [ "$2" = "docker-multiplatform" ]; then BuildDockerMultiplatform + elif [ "$2" = "web" ]; then + echo "web only" else BuildDev fi @@ -285,6 +287,8 @@ elif [ "$1" = "release" ]; then elif [ "$2" = "android" ]; then BuildReleaseAndroid MakeRelease "md5-android.txt" + elif [ "$2" = "web" ]; then + echo "web only" else BuildRelease MakeRelease "md5.txt" @@ -293,6 +297,8 @@ elif [ "$1" = "prepare" ]; then if [ "$2" = "docker-multiplatform" ]; then PrepareBuildDockerMusl fi +elif [ "$1" = "zip" ]; then + MakeRelease "$2".txt else echo -e "Parameter error" fi