Skip to content

Commit

Permalink
fix(ci): restructure release
Browse files Browse the repository at this point in the history
  • Loading branch information
adrielp committed Aug 17, 2024
1 parent 338756c commit a55cc7a
Showing 1 changed file with 11 additions and 9 deletions.
20 changes: 11 additions & 9 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -147,9 +147,19 @@ jobs:
permissions:
contents: write
steps:
- name: Generate a token
# if: steps.get_next_version.outputs.hasNextVersion == 'true'
id: generate_token
uses: actions/create-github-app-token@31c86eb3b33c9b601a1f60f98dcbfd1d70f379b4 # v1.10.3
with:
app-id: ${{ secrets.APP_ID }}
private-key: ${{ secrets.APP_PRIVATE_KEY }}
owner: ${{ github.repository_owner }}

- name: Clone repository
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
with:
token: ${{ steps.generate_token.outputs.token }}
fetch-depth: 0

- name: Install tools
Expand All @@ -166,14 +176,6 @@ jobs:
echo ${{ steps.get_next_version.outputs.version }}
echo ${{ steps.get_next_version.outputs.hasNextVersion }}
- name: Generate a token
if: steps.get_next_version.outputs.hasNextVersion == 'true'
id: generate_token
uses: actions/create-github-app-token@31c86eb3b33c9b601a1f60f98dcbfd1d70f379b4 # v1.10.3
with:
app-id: ${{ secrets.APP_ID }}
private-key: ${{ secrets.APP_PRIVATE_KEY }}
owner: ${{ github.repository_owner }}
- name: Get GitHub App User ID
id: get-user-id
Expand All @@ -187,7 +189,7 @@ jobs:
set -eo pipefail
git config --global user.name '${{ steps.generate_token.outputs.app-slug }}[bot]'
git config --global user.email '${{ steps.get-user-id.outputs.user-id }}+${{ steps.generate_token.outputs.app-slug }}[bot]@users.noreply.github.com'
gh auth login --hostname github.com --git-protocol https --with-token <<< "${{ steps.generate_token.outputs.token }}"
# gh auth login --hostname github.com --git-protocol https --with-token <<< "${{ steps.generate_token.outputs.token }}"
yq -i '.module-sets.liatrio-otel.version = "${{ steps.get_next_version.outputs.version }}"' versions.yaml
git add .
git commit -m "chore: run multimod to update versions ahead of release(version ${{ steps.get_next_version.outputs.version }})"
Expand Down

0 comments on commit a55cc7a

Please sign in to comment.