diff --git a/.github/workflows/canary.yml b/.github/workflows/canary.yml deleted file mode 100644 index 6039f77f56..0000000000 --- a/.github/workflows/canary.yml +++ /dev/null @@ -1,37 +0,0 @@ -name: Canary Release - -on: - pull_request: - branches: - - master - paths: - - ".changeset/**/*.md" - -jobs: - canary: - runs-on: ubuntu-latest - if: github.event.pull_request.head.repo.full_name == github.repository || github.event.inputs.onDemand == 'yes' - steps: - - name: Checkout - uses: actions/checkout@v3 - with: - fetch-depth: 0 - - - name: Use Node - uses: actions/setup-node@v3 - with: - node-version: 16 - cache: "yarn" - - - name: Install Dependencies using Yarn - run: yarn - - - name: Release Canary - id: canary - uses: "the-guild-org/changesets-snapshot-action@main" - with: - tag: alpha - prepareScript: "yarn build" - env: - NPM_TOKEN: ${{ secrets.NODE_AUTH_TOKEN }} - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/dependencies.yml b/.github/workflows/dependencies.yml deleted file mode 100644 index a0de886212..0000000000 --- a/.github/workflows/dependencies.yml +++ /dev/null @@ -1,18 +0,0 @@ -name: Dependencies Changeset - -on: pull_request - -jobs: - changeset: - if: github.event.pull_request.head.repo.full_name == github.repository - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@v3 - with: - fetch-depth: 0 - - - name: Create/Update Changesets - uses: "the-guild-org/changesets-dependencies-action@main" - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml new file mode 100644 index 0000000000..2498ed6a4a --- /dev/null +++ b/.github/workflows/pr.yml @@ -0,0 +1,22 @@ +name: PR + +on: + pull_request: + branches: + - master + +jobs: + dependencies: + uses: the-guild-org/shared-config/.github/workflows/changesets-dependencies.yaml@main + secrets: + githubToken: ${{ secrets.GITHUB_TOKEN }} + + release: + uses: the-guild-org/shared-config/.github/workflows/release-snapshot.yml@main + with: + npmTag: alpha + buildScript: build + nodeVersion: 18 + secrets: + githubToken: ${{ secrets.GITHUB_TOKEN }} + npmToken: ${{ secrets.NODE_AUTH_TOKEN }} diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 1872a9e672..b5beb57c2e 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -6,43 +6,11 @@ on: - master jobs: - release: - name: stable - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@v3 - with: - fetch-depth: 0 - - - name: Use Node - uses: actions/setup-node@v3 - with: - node-version: 16 - cache: "yarn" - - - name: Install Dependencies using Yarn - run: yarn - - - name: Build Packages - run: yarn build - - - name: set version variables - id: vars - shell: bash - run: | - echo "##[set-output name=branch;]$(echo ${GITHUB_REF#refs/heads/})" - echo "::set-output name=sha_short::$(git rev-parse --short HEAD)" - - - name: Create Release Pull Request or Publish to npm - id: changesets - uses: dotansimha/changesets-action@v1.3.1 - with: - publish: yarn release - commit: "chore(release): update monorepo packages versions" - title: "Upcoming Release Changes" - createGithubReleases: aggregate - githubReleaseName: "Release ${{ steps.vars.outputs.sha_short }} (from ${{ steps.vars.outputs.branch }})" - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - NPM_TOKEN: ${{ secrets.NODE_AUTH_TOKEN }} + stable: + uses: the-guild-org/shared-config/.github/workflows/release-stable.yml@main + with: + releaseScript: release + nodeVersion: 16 + secrets: + githubToken: ${{ secrets.GITHUB_TOKEN }} + npmToken: ${{ secrets.NODE_AUTH_TOKEN }}