Skip to content

Commit

Permalink
Skip ruby build caching for releases
Browse files Browse the repository at this point in the history
  • Loading branch information
reese authored Jan 26, 2024
1 parent 78c57d7 commit 2e1d619
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 10 deletions.
19 changes: 10 additions & 9 deletions .github/workflows/preview-release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,15 @@ on:
- completed
push:
# Run only on trunk pushes that aren't a new tag release
branches: [trunk]
branches: [trunk, reese-preview-release]
tags-ignore: "*"

env:
BUNDLE_PATH: /tmp/.bundle
GEM_HOME: /tmp/.bundle
GEM_PATH: /tmp/.bundle
TERM: xterm256
FORCE_FULL_RUBY_BUILD: 1

jobs:
bump-tag:
Expand Down Expand Up @@ -118,11 +119,11 @@ jobs:
- uses: actions/download-artifact@v3
with:
name: rubyfmt-release-artifact-macos-latest-native
- name: Upload Release
uses: softprops/action-gh-release@v1
with:
files: rubyfmt-*.tar.gz
fail_on_unmatched_files: true
generate_release_notes: true
prerelease: true
tag_name: ${{ steps.get-latest-tag.outputs.tag }}
# - name: Upload Release
# uses: softprops/action-gh-release@v1
# with:
# files: rubyfmt-*.tar.gz
# fail_on_unmatched_files: true
# generate_release_notes: true
# prerelease: true
# tag_name: ${{ steps.get-latest-tag.outputs.tag }}
3 changes: 2 additions & 1 deletion librubyfmt/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,8 @@ fn main() -> Output {

// Only rerun this build if the ruby_checkout has changed
match old_checkout_sha {
Some(old_sha) if old_sha == new_checkout_sha => {}
Some(old_sha)
if old_sha == new_checkout_sha && !env::var("FORCE_FULL_RUBY_BUILD").is_ok() => {}
_ => {
make_configure(&ruby_checkout_path)?;
run_configure(&ruby_checkout_path)?;
Expand Down

0 comments on commit 2e1d619

Please sign in to comment.