Skip to content

Commit

Permalink
fix?
Browse files Browse the repository at this point in the history
  • Loading branch information
filfreire committed May 31, 2024
1 parent 32ae99d commit ea813ec
Showing 1 changed file with 10 additions and 30 deletions.
40 changes: 10 additions & 30 deletions .github/workflows/release-start.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,16 +20,6 @@ jobs:
timeout-minutes: 5
runs-on: ubuntu-latest
steps:

- name: debug variables
run: |
echo "channel: ${{ github.event.inputs.channel }}"
echo "version: ${{ github.event.inputs.version }}"
echo "weird: ${{ github.event.inputs.channel != 'stable' && github.event.inputs.version && !contains(github.event.inputs.version, '-${{ github.event.inputs.channel }}') }}"
echo "weird2: ${{ github.event.inputs.channel != 'stable' }}"
echo "weird3: ${{ github.event.inputs.version }}"
echo "weird4: ${{ !contains(github.event.inputs.version, '-${{ github.event.inputs.channel }}') }}"
- name: Checkout branch
uses: actions/checkout@v4
with:
Expand Down Expand Up @@ -57,19 +47,14 @@ jobs:
if: github.event.inputs.channel == 'stable' && github.event.inputs.version
run: npm --workspaces version "${{ github.event.inputs.version }}"

# handle new "major" beta releases, e.g. 10.0, 11.0, 12.0 ...
- name: App version (alpha/beta, with new general version)
if: github.event.inputs.channel != 'stable' && github.event.inputs.version && !contains(github.event.inputs.version, "-${{ github.event.inputs.channel }}")
run: npm --workspaces version "${{ github.event.inputs.version }}-${{ github.event.inputs.channel }}.0"
- name: App version (stable, patch latest stable)
if: github.event.inputs.channel != 'stable' && !github.event.inputs.version
run: npm --workspaces version --preid "${{ github.event.inputs.channel }}" prerelease

# handle botched alpha/beta releases, e.g. for iterations that were merged before running release-publish
- name: App version (alpha/beta, with a specific version)
if: github.event.inputs.channel != 'stable' && github.event.inputs.version && contains(github.event.inputs.version, "-${{ github.event.inputs.channel }}")
- name: App version (stable, with a specific version)
if: github.event.inputs.channel != 'stable' && github.event.inputs.version
run: npm --workspaces version "${{ github.event.inputs.version }}"

- name: App version (alpha/beta, patch latest)
if: github.event.inputs.channel != 'stable' && !github.event.inputs.version
run: npm --workspaces version --preid "${{ github.event.inputs.channel }}" prerelease

# ############################################################

Expand Down Expand Up @@ -112,19 +97,14 @@ jobs:
if: github.event.inputs.channel == 'stable' && github.event.inputs.version
run: npm --workspaces version "${{ github.event.inputs.version }}"

# handle new "major" beta releases, e.g. 10.0, 11.0, 12.0 ...
- name: (Re-run) App version (alpha/beta, with new general version)
if: github.event.inputs.channel != 'stable' && ${{ github.event.inputs.version != '' }} && !contains(github.event.inputs.version, "-${{ github.event.inputs.channel }}")
run: npm --workspaces version "${{ github.event.inputs.version }}-${{ github.event.inputs.channel }}.0"
- name: (Re-run) App version (beta or alpha, patch latest beta/alpha)
if: github.event.inputs.channel != 'stable' && !github.event.inputs.version
run: npm --workspaces version --preid "${{ github.event.inputs.channel }}" prerelease

# handle botched alpha/beta releases, e.g. for iterations that were merged before running release-publish
- name: (Re-run) App version (alpha/beta, with a specific version)
if: github.event.inputs.channel != 'stable' && ${{ github.event.inputs.version != '' }} && contains(github.event.inputs.version, "-${{ github.event.inputs.channel }}")
- name: (Re-run) App version (beta or alpha, with a specific version)
if: github.event.inputs.channel != 'stable' && github.event.inputs.version
run: npm --workspaces version "${{ github.event.inputs.version }}"

- name: (Re-run) App version (alpha/beta, patch latest)
if: github.event.inputs.channel != 'stable' && !github.event.inputs.version
run: npm --workspaces version --preid "${{ github.event.inputs.channel }}" prerelease
# ############################################################

- name: Git Commit
Expand Down

0 comments on commit ea813ec

Please sign in to comment.