Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WORKFLOW] use dev as release draft branch trigger #1498

Merged
merged 11 commits into from
Jul 12, 2023
Merged
Show file tree
Hide file tree
Changes from 8 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .github/RELEASE_TEMPLATE/release-notes.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Changes in this stable release
## Changed
## Added
## Fixes
## Breaking
Original file line number Diff line number Diff line change
Expand Up @@ -40,4 +40,4 @@ jobs:
./tasks/testSchemasAndQueries.sh
working-directory: ${{ env.sdk-core-working-directory }}
env:
SUBGRAPH_RELEASE_TAG: ${{ inputs.subgraph-release }}
SUBGRAPH_RELEASE_TAG: ${{ inputs.subgraph-release }}

This file was deleted.

156 changes: 156 additions & 0 deletions .github/workflows/cd.packages-stable.create-release-drafts.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,156 @@
name: CD | Create Monorepo Packages Stable Release Draft
env:
GITHUB_TOKEN: ${{ secrets.CI_GITHUB_TOKEN }}

on:
workflow_dispatch:
push:
branches:
- "dev"
paths:
- "packages/ethereum-contracts/**"
- "packages/subgraph/**"
- "packages/sdk-core/**"
- "packages/sdk-redux/**"
- ".github/workflows/cd.packages-stable.create-release-drafts.yml"

jobs:
create-ethereum-contracts-release-draft:
name: Create Ethereum-Contracts Release Draft

runs-on: ubuntu-latest

permissions: write-all

steps:
- uses: actions/checkout@v3

- name: Use Node.js 18.x
uses: actions/setup-node@v3
with:
node-version: 18.x
registry-url: https://registry.npmjs.org/

- name: Check package versions
run: ./tasks/check-package-version.sh ethereum-contracts SHOULD_PUBLISH_ETHEREUM_CONTRACTS ETHEREUM_CONTRACTS_NEW_VERSION >> "$GITHUB_ENV"

- name: Create ethereum-contracts stable release draft
if: env.SHOULD_PUBLISH_ETHEREUM_CONTRACTS == 1
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token
with:
tag_name: ethereum-contracts@v${{ env.ETHEREUM_CONTRACTS_NEW_VERSION }}
release_name: ethereum-contracts@v${{ env.ETHEREUM_CONTRACTS_NEW_VERSION }}
body_path: .github/RELEASE_TEMPLATE/release-notes.md
draft: true

create-subgraph-release-draft:
name: Create Subgraph Release Draft

runs-on: ubuntu-latest

permissions: write-all

steps:
- uses: actions/checkout@v3

- name: Use Node.js 18.x
uses: actions/setup-node@v3
with:
node-version: 18.x
registry-url: https://registry.npmjs.org/

- name: Check package versions
run: ./tasks/check-package-version.sh subgraph SHOULD_PUBLISH_SUBGRAPH SUBGRAPH_NEW_VERSION >> "$GITHUB_ENV"

- name: Create subgraph stable release draft
if: env.SHOULD_PUBLISH_SUBGRAPH == 1
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token
with:
tag_name: subgraph@v${{ env.SUBGRAPH_NEW_VERSION }}
release_name: subgraph@v${{ env.SUBGRAPH_NEW_VERSION }}
body_path: .github/RELEASE_TEMPLATE/release-notes.md
draft: true

test-sdk-core-query-schema-against-deployed-v1-subgraphs:
uses: ./.github/workflows/call.check-query-schema-against-subgraph.yml
name: Test SDK-Core Query Schema and Queries Against Deployed V1 Subgraphs
with:
subgraph-release: v1

test-sdk-core-with-v1-release-subgraph:
uses: ./.github/workflows/call.test-sdk-core.yml
name: Build and Test SDK-Core (Release branch)
with:
subgraph-release: v1
subgraph-endpoint: ""
run-coverage-tests: false

create-sdk-core-release-draft:
name: Create SDK-Core Release Draft

runs-on: ubuntu-latest

needs:
[
test-sdk-core-query-schema-against-deployed-v1-subgraphs,
test-sdk-core-with-v1-release-subgraph,
]

permissions: write-all

steps:
- uses: actions/checkout@v3

- name: Use Node.js 18.x
uses: actions/setup-node@v3
with:
node-version: 18.x
registry-url: https://registry.npmjs.org/

- name: Check package versions
run: ./tasks/check-package-version.sh sdk-core SHOULD_PUBLISH_SDK_CORE SDK_CORE_NEW_VERSION >> "$GITHUB_ENV"

- name: Create sdk-core stable release draft
if: env.SHOULD_PUBLISH_SDK_CORE == 1
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token
with:
tag_name: sdk-core@v${{ env.SDK_CORE_NEW_VERSION }}
release_name: sdk-core@v${{ env.SDK_CORE_NEW_VERSION }}
body_path: .github/RELEASE_TEMPLATE/release-notes.md
draft: true

create-sdk-redux-release-draft:
name: Create SDK-Redux Release Draft

runs-on: ubuntu-latest

permissions: write-all

steps:
- uses: actions/checkout@v3

- name: Use Node.js 18.x
uses: actions/setup-node@v3
with:
node-version: 18.x
registry-url: https://registry.npmjs.org/

- name: Check package versions
run: ./tasks/check-package-version.sh sdk-redux SHOULD_PUBLISH_SDK_REDUX SDK_REDUX_NEW_VERSION >> "$GITHUB_ENV"

- name: Create sdk-redux stable release draft
if: env.SHOULD_PUBLISH_SDK_REDUX == 1
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token
with:
tag_name: sdk-redux@v${{ env.SDK_REDUX_NEW_VERSION }}
release_name: sdk-redux@v${{ env.SDK_REDUX_NEW_VERSION }}
body_path: .github/RELEASE_TEMPLATE/release-notes.md
draft: true
80 changes: 0 additions & 80 deletions .github/workflows/cd.sdk-core-stable.create-release-drafts.yml

This file was deleted.

62 changes: 0 additions & 62 deletions .github/workflows/cd.sdk-redux-stable.create-release-drafts.yml

This file was deleted.

Loading