Skip to content

Commit

Permalink
fix workflow4
Browse files Browse the repository at this point in the history
  • Loading branch information
cewert committed Feb 10, 2024
1 parent 1cfc414 commit a3984fd
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions .github/workflows/bump-version.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ on:

jobs:
build:
if: "${{ github.event.inputs.versionType == 'build' }}"
if: ${{ github.event.inputs.versionType == 'build' }}
runs-on: ubuntu-latest
steps:
# Setup
Expand All @@ -30,7 +30,7 @@ jobs:
with:
packages: jq
- name: Save a copy of github.ref_name without periods to env var
run: echo "refNameSlug=${{ github.ref_name }}" | sed -e 's/\.//g'
run: echo "refNameSlug=${{ github.ref_name }}" | sed -e 's/\.//g' >> $GITHUB_ENV
# Save old version
- name: Find and save old major_version from manifest
run: awk 'BEGIN { FS="=" } /^major_version/ { print "oldMajor="$2; }' manifest >> $GITHUB_ENV
Expand All @@ -44,7 +44,7 @@ jobs:
- name: Save new version to env var
run: echo "newVersion=${{ env.oldMajor }}.${{ env.oldMinor }}.${{ env.newBuild }}" >> $GITHUB_ENV
- name: Save a copy of newVersion without periods to env var
run: echo "newVersionSlug=${{ env.newVersion }}" | sed -e 's/\.//g'
run: echo "newVersionSlug=${{ env.newVersion }}" | sed -e 's/\.//g' >> $GITHUB_ENV
# Update files with new versions
- name: Update manifest build_version
run: sed -i "s/build_version=.*/build_version=${{ env.newBuild }}/g" manifest
Expand All @@ -63,12 +63,12 @@ jobs:
run: |-
git config user.name "jellyfin-bot"
git config user.email "[email protected]"
git checkout -b bump-${{ env.refNameSlug }}-to-${{ env.newVersionSlug }}
git checkout -b "bump-${{ env.refNameSlug }}-to-${{ env.newVersionSlug }}"
git add .
git commit -m "Bump ${{ github.event.inputs.versionType }} version"
gh pr create --base ${{ github.ref_name }} --head ${{ github.ref_name }} --fill
minor:
if: "${{ github.event.inputs.versionType }} == 'minor'"
if: ${{ github.event.inputs.versionType == 'minor' }}
runs-on: ubuntu-latest
steps:
# Setup
Expand All @@ -81,7 +81,7 @@ jobs:
with:
packages: jq
- name: Save a copy of github.ref_name without periods to env var
run: echo "refNameSlug=${{ github.ref_name }}" | sed -e 's/\.//g'
run: echo "refNameSlug=${{ github.ref_name }}" | sed -e 's/\.//g' >> $GITHUB_ENV
# Save old version
- name: Find and save old major_version from manifest
run: awk 'BEGIN { FS="=" } /^major_version/ { print "oldMajor="$2; }' manifest >> $GITHUB_ENV
Expand All @@ -95,7 +95,7 @@ jobs:
- name: Save new version to env var
run: echo "newVersion=${{ env.oldMajor }}.${{ env.newMinor }}.0" >> $GITHUB_ENV
- name: Save a copy of newVersion without periods to env var
run: echo "newVersionSlug=${{ env.newVersion }}" | sed -e 's/\.//g'
run: echo "newVersionSlug=${{ env.newVersion }}" | sed -e 's/\.//g' >> $GITHUB_ENV
# Update files with new versions
- name: Update manifest minor_version
run: sed -i "s/minor_version=.*/minor_version=${{ env.newMinor }}/g" manifest
Expand All @@ -116,13 +116,13 @@ jobs:
run: |-
git config user.name "jellyfin-bot"
git config user.email "[email protected]"
git checkout -b bump-${{ env.refNameSlug }}-to-${{ env.newVersionSlug }}
git checkout -b "bump-${{ env.refNameSlug }}-to-${{ env.newVersionSlug }}"
git add .
git commit -m "Bump ${{ github.event.inputs.versionType }} version"
gh pr create --base ${{ github.ref_name }} --head ${{ github.ref_name }} --fill
major:
if: "${{ github.event.inputs.versionType }} == 'major'"
if: ${{ github.event.inputs.versionType == 'major' }}
runs-on: ubuntu-latest
steps:
# Setup
Expand All @@ -135,7 +135,7 @@ jobs:
with:
packages: jq
- name: Save a copy of github.ref_name without periods to env var
run: echo "refNameSlug=${{ github.ref_name }}" | sed -e 's/\.//g'
run: echo "refNameSlug=${{ github.ref_name }}" | sed -e 's/\.//g' >> $GITHUB_ENV
# Save old version
- name: Find and save old major_version from manifest
run: awk 'BEGIN { FS="=" } /^major_version/ { print "oldMajor="$2; }' manifest >> $GITHUB_ENV
Expand All @@ -149,7 +149,7 @@ jobs:
- name: Save new version to env var
run: echo "newVersion=${{ env.newMajor }}.0.0" >> $GITHUB_ENV
- name: Save a copy of newVersion without periods to env var
run: echo "newVersionSlug=${{ env.newVersion }}" | sed -e 's/\.//g'
run: echo "newVersionSlug=${{ env.newVersion }}" | sed -e 's/\.//g' >> $GITHUB_ENV
# Update files with new versions
- name: Update manifest major_version
run: sed -i "s/major_version=.*/major_version=${{ env.newMajor }}/g" manifest
Expand All @@ -172,7 +172,7 @@ jobs:
run: |-
git config user.name "jellyfin-bot"
git config user.email "[email protected]"
git checkout -b bump-${{ env.refNameSlug }}-to-${{ env.newVersionSlug }}
git checkout -b "bump-${{ env.refNameSlug }}-to-${{ env.newVersionSlug }}"
git add .
git commit -m "Bump ${{ github.event.inputs.versionType }} version"
gh pr create --base ${{ github.ref_name }} --head ${{ github.ref_name }} --fill
Expand Down

0 comments on commit a3984fd

Please sign in to comment.