Skip to content

Commit

Permalink
update debug info stripping and release yaml
Browse files Browse the repository at this point in the history
  • Loading branch information
yigitozgumus committed Jan 9, 2025
1 parent a5e419e commit 783c079
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 4 deletions.
23 changes: 19 additions & 4 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,14 @@ name: Release
on:
push:
tags:
- 'v*'
- "v*"

env:
CARGO_TERM_COLOR: always

permissions:
contents: write
pull-requests: write

jobs:
create-release:
Expand Down Expand Up @@ -52,13 +53,28 @@ jobs:
id: extract_tag
run: echo "tag_name=${GITHUB_REF#refs/tags/}" >> $GITHUB_ENV

- name: Cache Rust dependencies
uses: actions/cache@v3
with:
path: ~/.cargo
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
restore-keys: |
${{ runner.os }}-cargo-
- name: Install Rust
uses: actions-rs/toolchain@v1
with:
toolchain: stable
target: ${{ matrix.target }}
override: true

- name: Sanitize environment
run: |
export HOME=/tmp/home
export CARGO_HOME=/tmp/cargo
export RUSTUP_HOME=/tmp/rustup
RUSTFLAGS="-C debuginfo=0" cargo build --release
- name: Build
uses: actions-rs/cargo@v1
with:
Expand Down Expand Up @@ -105,8 +121,7 @@ jobs:
if: matrix.os == 'macos-latest'
id: sha256
run: |
curl -L -o lazydraft.tar.gz https://github.com/yigitozgumus/lazydraft/releases/download/${{ env.tag_name }}/lazydraft-macos-amd64.tar.gz
shasum -a 256 lazydraft.tar.gz | awk '{ print $1 }' > sha256.txt
shasum -a 256 target/${{ matrix.target }}/release/${{ matrix.asset_name }}.tar.gz | awk '{ print $1 }' > sha256.txt
echo "::set-output name=sha256::$(cat sha256.txt)"
- name: Clone Homebrew Tap
Expand All @@ -130,4 +145,4 @@ jobs:
sed -i '' "s|sha256 \".*\"|sha256 \"${{ steps.sha256.outputs.sha256 }}\"|" lazydraft.rb
git add lazydraft.rb
git commit -m "Update lazydraft formula for version ${{ env.tag_name }}"
git push https://x-access-token:${{ secrets.PERSONAL_ACCESS_TOKEN }}@github.com/yigitozgumus/homebrew-formulae.git main
git push https://x-access-token:${{ secrets.PERSONAL_ACCESS_TOKEN }}@github.com/yigitozgumus/homebrew-formulae.git main
4 changes: 4 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@ name = "lazydraft"
version = "3.1.10"
edition = "2021"

[profile.release]
debug = 0 # Disable debug information
panic = "abort"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[dependencies]
Expand Down

0 comments on commit 783c079

Please sign in to comment.