|
| 1 | +name: Release |
| 2 | +on: |
| 3 | + push: |
| 4 | + branches: [ "release-test" ] |
| 5 | + tags: [ '[0-9]+.[0-9]+*' ] |
| 6 | + |
| 7 | +jobs: |
| 8 | + build: |
| 9 | + runs-on: ubuntu-latest |
| 10 | + steps: |
| 11 | + - name: Checkout sources |
| 12 | + uses: actions/checkout@v4 |
| 13 | + |
| 14 | + - name: Build release binary |
| 15 | + run: cargo build --release --locked |
| 16 | + |
| 17 | + - uses: actions/upload-artifact@v4 |
| 18 | + with: |
| 19 | + name: linux |
| 20 | + path: target/release/pbls |
| 21 | + |
| 22 | + # publish: |
| 23 | + # name: Publish |
| 24 | + # needs: [build] |
| 25 | + # runs-on: ubuntu-latest |
| 26 | + # steps: |
| 27 | + # - name: Checkout sources |
| 28 | + # uses: actions/checkout@v4 |
| 29 | + |
| 30 | + # - uses: actions/download-artifact@v4 |
| 31 | + |
| 32 | + # - name: Build archive |
| 33 | + # shell: bash |
| 34 | + # run: | |
| 35 | + # set -ex |
| 36 | + |
| 37 | + # source="$(pwd)" |
| 38 | + # mkdir -p runtime/grammars/sources |
| 39 | + # tar xJf grammars/grammars.tar.xz -C runtime/grammars/sources |
| 40 | + # rm -rf grammars |
| 41 | + |
| 42 | + # cd "$(mktemp -d)" |
| 43 | + # mv $source/bins-* . |
| 44 | + # mkdir dist |
| 45 | + |
| 46 | + # for dir in bins-* ; do |
| 47 | + # platform=${dir#"bins-"} |
| 48 | + # if [[ $platform =~ "windows" ]]; then |
| 49 | + # exe=".exe" |
| 50 | + # fi |
| 51 | + # pkgname=helix-$GITHUB_REF_NAME-$platform |
| 52 | + # mkdir -p $pkgname |
| 53 | + # cp $source/LICENSE $source/README.md $pkgname |
| 54 | + # mkdir $pkgname/contrib |
| 55 | + # cp -r $source/contrib/completion $pkgname/contrib |
| 56 | + # mv bins-$platform/runtime $pkgname/ |
| 57 | + # mv bins-$platform/hx$exe $pkgname |
| 58 | + # chmod +x $pkgname/hx$exe |
| 59 | + |
| 60 | + # if [[ "$platform" = "x86_64-linux" ]]; then |
| 61 | + # mv bins-$platform/helix-*.AppImage* dist/ |
| 62 | + # fi |
| 63 | + |
| 64 | + # if [ "$exe" = "" ]; then |
| 65 | + # tar cJf dist/$pkgname.tar.xz $pkgname |
| 66 | + # else |
| 67 | + # 7z a -r dist/$pkgname.zip $pkgname |
| 68 | + # fi |
| 69 | + # done |
| 70 | + |
| 71 | + # tar cJf dist/helix-$GITHUB_REF_NAME-source.tar.xz -C $source . |
| 72 | + # mv dist $source/ |
| 73 | + |
| 74 | + # - name: Upload binaries to release |
| 75 | + # uses: svenstaro/upload-release-action@v2 |
| 76 | + # if: env.preview == 'false' |
| 77 | + # with: |
| 78 | + # repo_token: ${{ secrets.GITHUB_TOKEN }} |
| 79 | + # file: dist/* |
| 80 | + # file_glob: true |
| 81 | + # tag: ${{ github.ref_name }} |
| 82 | + # overwrite: true |
| 83 | + |
| 84 | + # - name: Upload binaries as artifact |
| 85 | + # uses: actions/upload-artifact@v4 |
| 86 | + # if: env.preview == 'true' |
| 87 | + # with: |
| 88 | + # name: release |
| 89 | + # path: dist/* |
| 90 | + |
0 commit comments