.github/workflows/release-cm-gem.yml in cm-admin-4.2.1 vs .github/workflows/release-cm-gem.yml in cm-admin-4.3.0

- old
+ new

@@ -14,60 +14,60 @@ permissions: contents: read jobs: - # build: - # name: Build gem - # runs-on: ubuntu-latest + build: + name: Build gem + runs-on: ubuntu-latest - # permissions: - # id-token: write # IMPORTANT: this permission is mandatory for trusted publishing - # contents: write # IMPORTANT: this permission is required for `rake release` to push the release tag + permissions: + id-token: write # IMPORTANT: this permission is mandatory for trusted publishing + contents: write # IMPORTANT: this permission is required for `rake release` to push the release tag - # steps: - # # Set up - # - uses: actions/checkout@v4 + steps: + # Set up + - uses: actions/checkout@v4 - # - name: set git config - # env: - # GH_TOKEN: ${{ github.token }} - # run: | - # git config --global user.email "${GITHUB_ACTOR_ID}+${GITHUB_ACTOR}@users.noreply.github.com" - # git config --global user.name "$(gh api /users/${GITHUB_ACTOR} | jq .name -r)" - # git config -l - # - name: Set up Ruby - # uses: ruby/setup-ruby@v1 - # with: - # bundler-cache: true - # ruby-version: ruby + - name: set git config + env: + GH_TOKEN: ${{ github.token }} + run: | + git config --global user.email "${GITHUB_ACTOR_ID}+${GITHUB_ACTOR}@users.noreply.github.com" + git config --global user.name "$(gh api /users/${GITHUB_ACTOR} | jq .name -r)" + git config -l + - name: Set up Ruby + uses: ruby/setup-ruby@v1 + with: + bundler-cache: true + ruby-version: ruby - # - name: Install the gem-release - # run: gem install gem-release + - name: Install the gem-release + run: gem install gem-release - # - name: Bump the gem - # run: gem bump --version ${{ github.event.inputs.bump_type }} -p + - name: Bump the gem + run: gem bump --version ${{ github.event.inputs.bump_type }} -p - # - name: Remove lock on bundle - # run: bundle config set frozen false + - name: Remove lock on bundle + run: bundle config set frozen false - # - name: Bundle Install - # run: bundle install + - name: Bundle Install + run: bundle install - # - name: Git Add files - # run: git add Gemfile.lock + - name: Git Add files + run: git add Gemfile.lock - # - name: Git Commit - # run: git commit -m "Add bundle files" + - name: Git Commit + run: git commit -m "Add bundle files" - # - name: Push the new version - # run: git push origin ${{ github.ref_name }} + - name: Push the new version + run: git push origin ${{ github.ref_name }} release: name: Release gem runs-on: ubuntu-latest - # needs: build + needs: build permissions: id-token: write # IMPORTANT: this permission is mandatory for trusted publishing contents: write # IMPORTANT: this permission is required for `rake release` to push the release tag steps: @@ -97,9 +97,9 @@ GEM_FILE=$(ls *.gem | tail -n 1) echo "GEM_FILE=$GEM_FILE" >> $GITHUB_ENV - name: Push gem env: - GEM_FILE: ${{ env.GEM_FILE }} + CM_GEMS_PASSWORD: ${{ vars.CM_GEMS_PASSWORD }} CM_GEMS_HOST: ${{ vars.CM_GEMS_HOST }} run: | - gem push $GEM_FILE --host $CM_GEMS_HOST + ./upload.sh $CM_GEMS_PASSWORD $CM_GEMS_HOST