diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 00c5e58f3..01f46d77c 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -14,10 +14,17 @@ jobs: release: runs-on: ubuntu-latest steps: + - name: Generate a token + id: generate-token + uses: actions/create-github-app-token@v1 + with: + app-id: ${{ secrets.APP_ID }} + private-key: ${{ secrets.APP_PEM }} + owner: ${{ github.repository_owner }} - uses: actions/checkout@v4 with: fetch-depth: 0 - ssh-key: ${{ secrets.DEPLOY_KEY }} + token: ${{ steps.generate-token.outputs.token }} - name: git config run: | git config user.name "${GITHUB_ACTOR}" @@ -29,4 +36,15 @@ jobs: - run: yarn - run: yarn release --ci --verbose env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + preview-build: + runs-on: ubuntu-latest + needs: "release" + steps: + - name: Repository Dispatch + uses: peter-evans/repository-dispatch@v3 + with: + token: ${{ steps.generate-token.outputs.token }} + repository: nasa-impact/veda-config + event-type: update-version + client-payload: '{"ref": "${{ github.ref }}", "VERSION_NUMBER": "${{ env.VERSION_NUMBER }}"}' \ No newline at end of file diff --git a/.release-it.json b/.release-it.json index c34ee090c..b35a5c711 100644 --- a/.release-it.json +++ b/.release-it.json @@ -1,5 +1,7 @@ { - "hooks": {}, + "hooks": { + "after:release": "echo \"VERSION_NUMBER=v${version}\" >> \"$GITHUB_ENV\" " + }, "plugins": { "@release-it/conventional-changelog": { "preset": {