Skip to content

Commit 949b658

Browse files
committed
fix: merge deployment
1 parent 74c47c1 commit 949b658

File tree

2 files changed

+35
-0
lines changed

2 files changed

+35
-0
lines changed

.github/workflows/on-merge.yml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,38 @@ jobs:
8383
echo "::set-output name=version::$VERSION"
8484
VERSION=$(cat Cargo.toml | grep "name" | head -n 1 | cut -d'"' -f2)
8585
echo "::set-output name=name::$NAME"
86+
- name: Create deployment
87+
id: deployment
88+
uses: actions/github-script@v2
89+
env:
90+
REF: ${{ steps.push.outputs.ref }}
91+
VERSION: ${{ steps.push.outputs.VERSION }}
92+
NAME: "async-graphql-extension-apollo-tracing"
93+
VERSION_BUMP: ${{ steps.extract-version-labels.outputs.versionBump }}
94+
with:
95+
github-token: ${{ secrets.TOKEN_REPO_WRITE }}
96+
previews: 'ant-man-preview,flash-preview'
97+
script: |
98+
const ref = process.env.REF;
99+
const name = process.env.NAME;
100+
const version = process.env.VERSION;
101+
const npmTag = process.env.VERSION_BUMP === 'beta' ? 'beta' : 'latest';
102+
const { data: deployment } = await github.repos.createDeployment({
103+
owner: context.repo.owner,
104+
repo: context.repo.repo,
105+
ref: `v${version}`,
106+
environment: 'Crates',
107+
auto_merge: false,
108+
required_contexts: [],
109+
payload: {
110+
version,
111+
name,
112+
ref,
113+
npmTag,
114+
},
115+
description: `Deploy ${name}@${version} on crates.io`,
116+
production_environment: true,
117+
});
86118
- name: Extract release changelog
87119
id: extract-changelog
88120
if: steps.extract-version-label.outputs.versionBump != 'beta'

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
66
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
77

88
## [Unreleased]
9+
### Fix
10+
11+
- Merge deployment
912

1013
## [0.2.1]
1114

0 commit comments

Comments
 (0)