Skip to content

Commit

Permalink
working on snapshot releases
Browse files Browse the repository at this point in the history
  • Loading branch information
phryneas committed Feb 12, 2024
1 parent 5ee9008 commit 0672b37
Showing 1 changed file with 21 additions and 15 deletions.
36 changes: 21 additions & 15 deletions .github/workflows/snapshot-release.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
name: Snapshot Release
on:
workflow_dispatch:
issue_comment:
types:
- created
Expand All @@ -12,16 +13,19 @@ jobs:
pull-requests: write
if: |
github.repository == 'apollographql/apollo-client-nextjs' &&
github.event.issue.pull_request &&
(
github.event.sender.login == 'benjamn' ||
github.event.sender.login == 'alessbell' ||
github.event.sender.login == 'bignimbus' ||
github.event.sender.login == 'hwillson' ||
github.event.sender.login == 'jerelmiller' ||
github.event.sender.login == 'phryneas'
) &&
startsWith(github.event.comment.body, '/release:pr')
github.event_name == 'workflow_dispatch' ||
(github.event.issue.pull_request &&
(
github.event.sender.login == 'benjamn' ||
github.event.sender.login == 'alessbell' ||
github.event.sender.login == 'bignimbus' ||
github.event.sender.login == 'hwillson' ||
github.event.sender.login == 'jerelmiller' ||
github.event.sender.login == 'phryneas'
) &&
startsWith(github.event.comment.body, '/release:pr')
))
steps:
- uses: alessbell/[email protected]
id: comment-branch
Expand All @@ -31,19 +35,21 @@ jobs:
with:
## specify the owner + repository in order to checkout the fork
## for community PRs
repository: ${{ steps.comment-branch.outputs.head_owner }}/${{ steps.comment-branch.outputs.head_repo }}
ref: ${{ steps.comment-branch.outputs.head_ref }}
#repository: ${{ steps.comment-branch.outputs.head_owner }}/${{ steps.comment-branch.outputs.head_repo }}
#ref: ${{ steps.comment-branch.outputs.head_ref }}
fetch-depth: 0
- uses: actions/setup-node@v4
with:
node-version: "20"
registry-url: "https://registry.npmjs.org"
cache: "yarn"
- run: yarn install --immutable
- run: yarn workspace @apollo/experimental-nextjs-app-support version "0.0.0-commit-$(git rev-parse --short HEAD)"
- run: yarn workspace @apollo/experimental-nextjs-app-support exec npm publish --access public --tag snapshot --provenance
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
- run: echo PKG_VERSION="0.0.0-commit-$(git rev-parse --short HEAD)" >> $GITHUB_ENV
- run: yarn workspace @apollo/client-react-streaming-support exec npm pkg set "version=${{ env.PKG_VERSION }}"
- run: yarn workspace @apollo/experimental-nextjs-app-support exec npm pkg set "dependencies[@apollo/client-react-streaming-support]=${{ env.PKG_VERSION }}" "version=${{ env.PKG_VERSION }}"
#- run: yarn workspace @apollo/experimental-nextjs-app-support exec npm publish --access public --tag snapshot --provenance
# env:
# NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

- name: Get released version
id: get-version
Expand Down

0 comments on commit 0672b37

Please sign in to comment.