Skip to content

Commit

Permalink
Push tags first
Browse files Browse the repository at this point in the history
  • Loading branch information
reese authored Dec 20, 2023
1 parent fdc34a3 commit 6116f6f
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 18 deletions.
43 changes: 26 additions & 17 deletions .github/workflows/preview-release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ on:
- completed
push:
# Run only on trunk pushes that aren't a new tag release
branches: [trunk]
branches: "*"
tags-ignore: "*"

env:
Expand All @@ -16,8 +16,23 @@ env:
TERM: xterm256

jobs:
bump-tag:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions-ecosystem/action-get-latest-tag@v1
id: get-latest-tag
- uses: actions-ecosystem/action-bump-semver@v1
id: bump-semver
with:
current_version: ${{ steps.get-latest-tag.outputs.tag }}
level: prepatch
- uses: actions-ecosystem/action-push-tag@v1
with:
tag: ${{ steps.bump-semver.outputs.new_version }}
build:
runs-on: ${{ matrix.os }}
needs: [bump-tag]
strategy:
fail-fast: false
matrix:
Expand Down Expand Up @@ -99,19 +114,13 @@ jobs:
name: rubyfmt-release-artifact-macos-latest-native
- uses: actions-ecosystem/action-get-latest-tag@v1
id: get-latest-tag
- uses: actions-ecosystem/action-bump-semver@v1
id: bump-semver
with:
current_version: ${{ steps.get-latest-tag.outputs.tag }}
level: prepatch
- uses: actions-ecosystem/action-push-tag@v1
with:
tag: ${{ steps.bump-semver.outputs.new_version }}
- 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.bump-semver.outputs.new_version}}
- run: |
echo "${{ 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 }}
2 changes: 1 addition & 1 deletion script/make_release
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ if [[ $OSTYPE == "darwin"* ]]; then
fi
bison --version

TAG=$(git describe --tags --abbrev=0)
TAG=$(git describe --exact-match HEAD)
RELEASE_DIR=${RELEASE_DIR:-"tmp/releases/${TAG}-$(uname -s)/"}

./script/test.sh
Expand Down

0 comments on commit 6116f6f

Please sign in to comment.