From 2893355aa112d09f9a0d3893660cf6dd16818583 Mon Sep 17 00:00:00 2001 From: Evangelos Paterakis Date: Sun, 6 Nov 2022 11:43:08 +0200 Subject: [PATCH] feat(ci): static releases --- .github/workflows/release.yml | 41 +++++++++++++++++++++++++++++++++++ .github/workflows/spec.yml | 17 --------------- README.md | 2 +- shard.yml | 2 +- 4 files changed, 43 insertions(+), 19 deletions(-) create mode 100644 .github/workflows/release.yml delete mode 100644 .github/workflows/spec.yml diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..a50ce22 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,41 @@ +name: Release +on: workflow_dispatch +jobs: + build_linux_static: + runs-on: ubuntu-latest + container: + image: crystallang/crystal:latest-alpine + steps: + - name: Download source + uses: actions/checkout@v2 + - name: Retrieve version + run: | + echo "::set-output name=VERSION::$(shards version)" + id: version + - name: Build + run: shards build --production --no-debug --release --static + - name: Make binary executable + run: chmod +x bin/crycord + - name: Upload artifact + uses: actions/upload-artifact@v3 + with: + name: crycord-${{ steps.version.outputs.VERSION }}-linux-x86_64-static + path: bin/crycord + + release: + runs-on: ubuntu-latest + needs: build_linux_static + steps: + - uses: actions/checkout@v2 + - uses: actions/download-artifact@v2 + with: + path: ./GH_ARTIFACTS + - name: Make all binaries executable + run: chmod +x GH_ARTIFACTS/**/* + - name: Create zips + run: cd GH_ARTIFACTS && find . -maxdepth 1 -mindepth 1 -type d -execdir zip -jr '{}.zip' '{}' \; && cd .. + - uses: softprops/action-gh-release@v1 + with: + draft: true + files: | + GH_ARTIFACTS/*.zip diff --git a/.github/workflows/spec.yml b/.github/workflows/spec.yml deleted file mode 100644 index 5eee1ca..0000000 --- a/.github/workflows/spec.yml +++ /dev/null @@ -1,17 +0,0 @@ -name: Specs & Lint - -on: [push, pull_request] -jobs: - deploy: - runs-on: ubuntu-16.04 - steps: - - uses: actions/checkout@v2 - - uses: MeilCli/setup-crystal-action@v4.1.1 - with: - crystal_version: 1.0.0 - - name: Shards install - run: shards install - - name: Spec - run: crystal spec - - name: Check formatting - run: crystal tool format --check \ No newline at end of file diff --git a/README.md b/README.md index ad56516..8de8223 100644 --- a/README.md +++ b/README.md @@ -13,7 +13,7 @@ Uses [asar-cr](https://github.com/GeopJr/asar-cr). ## Installation -You can download the *statically* linked build from the releases page! +You can download the *statically* linked build from the [releases page](https://github.com/GeopJr/Crycord/releases/latest)! ## Building diff --git a/shard.yml b/shard.yml index 7fa0b34..7753c2b 100644 --- a/shard.yml +++ b/shard.yml @@ -1,5 +1,5 @@ name: crycord -version: 1.3.2 +version: 1.4.0 authors: - GeopJr