Skip to content

Commit

Permalink
Workflow (#39)
Browse files Browse the repository at this point in the history
* updating the release.yaml workflow so i can crosscompile for windows as well as linux.

* Release version v1.2.0

* testing workflow

* adding `determine tag` and `upload binaries to release` blocks.

* adding the `make esbuild` to steps.

* changing ref, no token.

* using token.

* specifying files to be uploaded

* including gcc-mingw-w64-x86-64 installation.

* fixing conditional.

* fixing artifact folder.

* updating for dev

* removing artifacts

* adding artifacts

* fixing conditional

* using the artifacts folder.

* back to working workflow

* installing mingw

* removing old workflows

* removing overwrite

* pointing paddler-bin-linux-amd64.zip

* pointing paddler-bin-linux-amd64/paddler-bin-linux-amd64.zip

* pointing artifacts/paddler-bin-linux-amd64/paddler-bin-linux-amd64.zip

* release pointing to artifacts/paddler-bin-linux-amd64/paddler-bin-linux-amd64.zip

* release pointing to paddler-bin-linux-amd64/paddler-bin-linux-amd64.zip

* release pointing to paddler-bin-linux-amd64.zip

* telling file and asset_name

* file: target/release/paddler
        asset_name: paddler-bin-linux-amd64

* original workflow

* removing release section

* uploading everything in the artifacts folder

* uploading file by matrix variable

* add mingw

* using another toolchain action

* modifying target

* adding mingw

* removing the old workflow.

* adjusting to small letter

* using action for installing the gcc compiler instead of installing manually.

* using other toolchain for this.

* using manual instalation.
  • Loading branch information
Propfend authored Jan 20, 2025
1 parent 9eb79e3 commit a9e3e5e
Showing 1 changed file with 30 additions and 7 deletions.
37 changes: 30 additions & 7 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,17 +10,41 @@ jobs:
build:
name: build
runs-on: ubuntu-latest
strategy:
matrix:
include:
- rust_target: x86_64-unknown-linux-gnu
artifact_name: paddler-bin-linux-amd64

- rust_target: x86_64-pc-windows-gnu
artifact_name: paddler-bin-windows-amd64.exe

steps:
- name: checkout code
uses: actions/checkout@v4

# - name: set up rust
# uses: dtolnay/rust-toolchain@stable
- name: set up Rust
uses: dtolnay/rust-toolchain@stable
with:
toolchain: stable
target: ${{ matrix.rust_target }}

- name: build static
run: |
make esbuild
- name: install mingw for Windows cross-compilation
if: matrix.rust_target == 'x86_64-pc-windows-gnu'
run: sudo apt-get install -y gcc-mingw-w64-x86-64

- name: build
- name: build the binary
run: |
make build
cargo build --features web_dashboard --release --target ${{ matrix.rust_target }}
if [[ "${{ matrix.artifact_name }}" == *.exe ]]; then
mv target/${{ matrix.rust_target }}/release/paddler.exe ${{ matrix.artifact_name }}
else
mv target/${{ matrix.rust_target }}/release/paddler ${{ matrix.artifact_name }}
fi
- name: determine tag type
id: tag_type
Expand All @@ -37,8 +61,7 @@ jobs:
if: steps.tag_type.outputs.tag_type != 'INVALID_TAG'
uses: svenstaro/upload-release-action@v2
with:
file: target/release/paddler
asset_name: paddler-bin-linux-amd64
file: ${{ matrix.artifact_name }}
overwrite: true
prerelease: ${{ steps.tag_type.outputs.tag_type == 'PRE_RELEASE_TAG' }}
tag: ${{ github.ref }}
tag: ${{ github.ref }}

0 comments on commit a9e3e5e

Please sign in to comment.