From 24d99bdc3e45ea1b94c9d6285de5784ec6565e93 Mon Sep 17 00:00:00 2001 From: h1dden-da3m0n <33120068+h1dden-da3m0n@users.noreply.github.com> Date: Sun, 20 Jun 2021 19:21:14 +0200 Subject: add auto-bump_version workflow --- .github/workflows/auto-bump_version.yml | 96 +++++++++++++++++++++++++++++++++ 1 file changed, 96 insertions(+) create mode 100644 .github/workflows/auto-bump_version.yml (limited to '.github/workflows') diff --git a/.github/workflows/auto-bump_version.yml b/.github/workflows/auto-bump_version.yml new file mode 100644 index 000000000..67f2e6064 --- /dev/null +++ b/.github/workflows/auto-bump_version.yml @@ -0,0 +1,96 @@ +name: Auto bump_version + +on: + release: + types: + - published + workflow_dispatch: + inputs: + TAG_BRANCH: + required: true + description: release-x.y.z + NEXT_VERSION: + required: true + description: x.y.z + +jobs: + auto_bump_version: + runs-on: ubuntu-latest + if: ${{ github.event_name == 'release' && !contains(github.event.release.tag_name, 'rc') }} + env: + TAG_BRANCH: ${{ github.event.release.target_commitish }} + steps: + - name: Wait for deploy checks to finish + uses: jitterbit/await-check-suites@v1 + with: + ref: ${{ env.TAG_BRANCH }} + intervalSeconds: 60 + timeoutSeconds: 3600 + + - name: Setup YQ + uses: chrisdickinson/setup-yq@latest + with: + yq-version: v4.9.6 + + - name: Checkout Repository + uses: actions/checkout@v2 + with: + ref: ${{ env.TAG_BRANCH }} + + - name: Setup EnvVars + run: |- + CURRENT_VERSION=$(yq e '.version' build.yaml) + CURRENT_MAJOR_MINOR=${CURRENT_VERSION%.*} + CURRENT_PATCH=${CURRENT_VERSION##*.} + echo "CURRENT_VERSION=${CURRENT_VERSION}" >> $GITHUB_ENV + echo "CURRENT_MAJOR_MINOR=${CURRENT_MAJOR_MINOR}" >> $GITHUB_ENV + echo "CURRENT_PATCH=${CURRENT_PATCH}" >> $GITHUB_ENV + echo "NEXT_VERSION=${CURRENT_MAJOR_MINOR}.$(($CURRENT_PATCH + 1))" >> $GITHUB_ENV + + - name: Run bump_version + run: ./bump_version ${{ env.NEXT_VERSION }} + + - name: Commit Changes + run: |- + git config user.name "jellyfin-bot" + git config user.email "team@jellyfin.org" + git checkout ${{ env.TAG_BRANCH }} + git commit -am "Bump version to ${{ env.NEXT_VERSION }}" + git push origin ${{ env.TAG_BRANCH }} + + manual_bump_version: + runs-on: ubuntu-latest + if: ${{ github.event_name == 'workflow_dispatch' }} + env: + TAG_BRANCH: ${{ github.event.inputs.TAG_BRANCH }} + steps: + - name: Setup YQ + uses: chrisdickinson/setup-yq@latest + with: + yq-version: v4.9.6 + + - name: Checkout Repository + uses: actions/checkout@v2 + with: + ref: ${{ env.TAG_BRANCH }} + + - name: Setup EnvVars + run: |- + CURRENT_VERSION=$(yq e '.version' build.yaml) + CURRENT_MAJOR_MINOR=${CURRENT_VERSION%.*} + CURRENT_PATCH=${CURRENT_VERSION##*.} + echo "CURRENT_VERSION=${CURRENT_VERSION}" >> $GITHUB_ENV + echo "CURRENT_MAJOR_MINOR=${CURRENT_MAJOR_MINOR}" >> $GITHUB_ENV + echo "CURRENT_PATCH=${CURRENT_PATCH}" >> $GITHUB_ENV + echo "NEXT_VERSION=${{ github.event.inputs.NEXT_VERSION }}" >> $GITHUB_ENV + + - name: Run bump_version + run: ./bump_version ${{ env.NEXT_VERSION }} + + - name: Commit Changes + run: |- + git config user.name "jellyfin-bot" + git config user.email "team@jellyfin.org" + git checkout ${{ env.TAG_BRANCH }} + git commit -am "Bump version to ${{ env.NEXT_VERSION }}" + git push origin ${{ env.TAG_BRANCH }} -- cgit v1.2.3 From 9923ea6151282df1204089289d59a158b6eaaf67 Mon Sep 17 00:00:00 2001 From: h1dden-da3m0n <33120068+h1dden-da3m0n@users.noreply.github.com> Date: Sun, 27 Jun 2021 13:20:54 +0200 Subject: change to address review feedback --- .github/workflows/auto-bump_version.yml | 16 +--------------- 1 file changed, 1 insertion(+), 15 deletions(-) (limited to '.github/workflows') diff --git a/.github/workflows/auto-bump_version.yml b/.github/workflows/auto-bump_version.yml index 67f2e6064..dc0adb96b 100644 --- a/.github/workflows/auto-bump_version.yml +++ b/.github/workflows/auto-bump_version.yml @@ -63,27 +63,13 @@ jobs: if: ${{ github.event_name == 'workflow_dispatch' }} env: TAG_BRANCH: ${{ github.event.inputs.TAG_BRANCH }} + NEXT_VERSION: ${{ github.event.inputs.NEXT_VERSION }} steps: - - name: Setup YQ - uses: chrisdickinson/setup-yq@latest - with: - yq-version: v4.9.6 - - name: Checkout Repository uses: actions/checkout@v2 with: ref: ${{ env.TAG_BRANCH }} - - name: Setup EnvVars - run: |- - CURRENT_VERSION=$(yq e '.version' build.yaml) - CURRENT_MAJOR_MINOR=${CURRENT_VERSION%.*} - CURRENT_PATCH=${CURRENT_VERSION##*.} - echo "CURRENT_VERSION=${CURRENT_VERSION}" >> $GITHUB_ENV - echo "CURRENT_MAJOR_MINOR=${CURRENT_MAJOR_MINOR}" >> $GITHUB_ENV - echo "CURRENT_PATCH=${CURRENT_PATCH}" >> $GITHUB_ENV - echo "NEXT_VERSION=${{ github.event.inputs.NEXT_VERSION }}" >> $GITHUB_ENV - - name: Run bump_version run: ./bump_version ${{ env.NEXT_VERSION }} -- cgit v1.2.3 From 25fc8a1c934706d1a0cf8c424f379e6e708a3283 Mon Sep 17 00:00:00 2001 From: h1dden-da3m0n <33120068+h1dden-da3m0n@users.noreply.github.com> Date: Sun, 12 Sep 2021 21:52:14 +0200 Subject: ci: unify name to web equivalent workflow see jellyfin/jellyfin-web#2897 for reference --- .github/workflows/auto-bump_version.yml | 82 -------------------------------- .github/workflows/repo-bump-version.yaml | 82 ++++++++++++++++++++++++++++++++ 2 files changed, 82 insertions(+), 82 deletions(-) delete mode 100644 .github/workflows/auto-bump_version.yml create mode 100644 .github/workflows/repo-bump-version.yaml (limited to '.github/workflows') diff --git a/.github/workflows/auto-bump_version.yml b/.github/workflows/auto-bump_version.yml deleted file mode 100644 index dc0adb96b..000000000 --- a/.github/workflows/auto-bump_version.yml +++ /dev/null @@ -1,82 +0,0 @@ -name: Auto bump_version - -on: - release: - types: - - published - workflow_dispatch: - inputs: - TAG_BRANCH: - required: true - description: release-x.y.z - NEXT_VERSION: - required: true - description: x.y.z - -jobs: - auto_bump_version: - runs-on: ubuntu-latest - if: ${{ github.event_name == 'release' && !contains(github.event.release.tag_name, 'rc') }} - env: - TAG_BRANCH: ${{ github.event.release.target_commitish }} - steps: - - name: Wait for deploy checks to finish - uses: jitterbit/await-check-suites@v1 - with: - ref: ${{ env.TAG_BRANCH }} - intervalSeconds: 60 - timeoutSeconds: 3600 - - - name: Setup YQ - uses: chrisdickinson/setup-yq@latest - with: - yq-version: v4.9.6 - - - name: Checkout Repository - uses: actions/checkout@v2 - with: - ref: ${{ env.TAG_BRANCH }} - - - name: Setup EnvVars - run: |- - CURRENT_VERSION=$(yq e '.version' build.yaml) - CURRENT_MAJOR_MINOR=${CURRENT_VERSION%.*} - CURRENT_PATCH=${CURRENT_VERSION##*.} - echo "CURRENT_VERSION=${CURRENT_VERSION}" >> $GITHUB_ENV - echo "CURRENT_MAJOR_MINOR=${CURRENT_MAJOR_MINOR}" >> $GITHUB_ENV - echo "CURRENT_PATCH=${CURRENT_PATCH}" >> $GITHUB_ENV - echo "NEXT_VERSION=${CURRENT_MAJOR_MINOR}.$(($CURRENT_PATCH + 1))" >> $GITHUB_ENV - - - name: Run bump_version - run: ./bump_version ${{ env.NEXT_VERSION }} - - - name: Commit Changes - run: |- - git config user.name "jellyfin-bot" - git config user.email "team@jellyfin.org" - git checkout ${{ env.TAG_BRANCH }} - git commit -am "Bump version to ${{ env.NEXT_VERSION }}" - git push origin ${{ env.TAG_BRANCH }} - - manual_bump_version: - runs-on: ubuntu-latest - if: ${{ github.event_name == 'workflow_dispatch' }} - env: - TAG_BRANCH: ${{ github.event.inputs.TAG_BRANCH }} - NEXT_VERSION: ${{ github.event.inputs.NEXT_VERSION }} - steps: - - name: Checkout Repository - uses: actions/checkout@v2 - with: - ref: ${{ env.TAG_BRANCH }} - - - name: Run bump_version - run: ./bump_version ${{ env.NEXT_VERSION }} - - - name: Commit Changes - run: |- - git config user.name "jellyfin-bot" - git config user.email "team@jellyfin.org" - git checkout ${{ env.TAG_BRANCH }} - git commit -am "Bump version to ${{ env.NEXT_VERSION }}" - git push origin ${{ env.TAG_BRANCH }} diff --git a/.github/workflows/repo-bump-version.yaml b/.github/workflows/repo-bump-version.yaml new file mode 100644 index 000000000..351e24576 --- /dev/null +++ b/.github/workflows/repo-bump-version.yaml @@ -0,0 +1,82 @@ +name: '🆙 Auto bump_version' + +on: + release: + types: + - published + workflow_dispatch: + inputs: + TAG_BRANCH: + required: true + description: release-x.y.z + NEXT_VERSION: + required: true + description: x.y.z + +jobs: + auto_bump_version: + runs-on: ubuntu-latest + if: ${{ github.event_name == 'release' && !contains(github.event.release.tag_name, 'rc') }} + env: + TAG_BRANCH: ${{ github.event.release.target_commitish }} + steps: + - name: Wait for deploy checks to finish + uses: jitterbit/await-check-suites@v1 + with: + ref: ${{ env.TAG_BRANCH }} + intervalSeconds: 60 + timeoutSeconds: 3600 + + - name: Setup YQ + uses: chrisdickinson/setup-yq@latest + with: + yq-version: v4.9.8 + + - name: Checkout Repository + uses: actions/checkout@v2 + with: + ref: ${{ env.TAG_BRANCH }} + + - name: Setup EnvVars + run: |- + CURRENT_VERSION=$(yq e '.version' build.yaml) + CURRENT_MAJOR_MINOR=${CURRENT_VERSION%.*} + CURRENT_PATCH=${CURRENT_VERSION##*.} + echo "CURRENT_VERSION=${CURRENT_VERSION}" >> $GITHUB_ENV + echo "CURRENT_MAJOR_MINOR=${CURRENT_MAJOR_MINOR}" >> $GITHUB_ENV + echo "CURRENT_PATCH=${CURRENT_PATCH}" >> $GITHUB_ENV + echo "NEXT_VERSION=${CURRENT_MAJOR_MINOR}.$(($CURRENT_PATCH + 1))" >> $GITHUB_ENV + + - name: Run bump_version + run: ./bump_version ${{ env.NEXT_VERSION }} + + - name: Commit Changes + run: |- + git config user.name "jellyfin-bot" + git config user.email "team@jellyfin.org" + git checkout ${{ env.TAG_BRANCH }} + git commit -am "Bump version to ${{ env.NEXT_VERSION }}" + git push origin ${{ env.TAG_BRANCH }} + + manual_bump_version: + runs-on: ubuntu-latest + if: ${{ github.event_name == 'workflow_dispatch' }} + env: + TAG_BRANCH: ${{ github.event.inputs.TAG_BRANCH }} + NEXT_VERSION: ${{ github.event.inputs.NEXT_VERSION }} + steps: + - name: Checkout Repository + uses: actions/checkout@v2 + with: + ref: ${{ env.TAG_BRANCH }} + + - name: Run bump_version + run: ./bump_version ${{ env.NEXT_VERSION }} + + - name: Commit Changes + run: |- + git config user.name "jellyfin-bot" + git config user.email "team@jellyfin.org" + git checkout ${{ env.TAG_BRANCH }} + git commit -am "Bump version to ${{ env.NEXT_VERSION }}" + git push origin ${{ env.TAG_BRANCH }} -- cgit v1.2.3