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 df5a9ff
Showing 1 changed file with 25 additions and 19 deletions.
44 changes: 25 additions & 19 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 @@ -97,21 +112,12 @@ jobs:
- uses: actions/download-artifact@v3
with:
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 ${{github.ref}}
# - 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

0 comments on commit df5a9ff

Please sign in to comment.