diff --git a/.github/workflows/preview-release.yaml b/.github/workflows/preview-release.yaml index 2c4a9ded..9604ac7b 100644 --- a/.github/workflows/preview-release.yaml +++ b/.github/workflows/preview-release.yaml @@ -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: @@ -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: @@ -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 }} diff --git a/script/make_release b/script/make_release index a94043cc..9234bfb7 100755 --- a/script/make_release +++ b/script/make_release @@ -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