Skip to content
This repository was archived by the owner on Feb 15, 2025. It is now read-only.

Commit e79c5de

Browse files
committed
Merge branch 'develop' into master
# Conflicts: # .github/workflows/release.yaml # lerna.json # packages/mono-one/CHANGELOG.md # packages/mono-one/package.json # packages/mono-two/CHANGELOG.md # packages/mono-two/package.json
2 parents 8f8c58c + 95434ee commit e79c5de

File tree

10 files changed

+178
-122
lines changed

10 files changed

+178
-122
lines changed

.changeset/real-walls-repeat.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@bennodev/mono-one": patch
3+
---
4+
5+
Updated Mono One
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: release
2+
on:
3+
fork: # push
4+
branches:
5+
- master
6+
7+
jobs:
8+
release:
9+
name: Release
10+
runs-on: ubuntu-latest
11+
steps:
12+
13+
# Checkout Project
14+
- name: 📚 Checkout
15+
uses: actions/checkout@v2
16+
17+
# Setup NodeJS
18+
- name: 🟢 Setup Node ${{ matrix.node_version }}
19+
uses: actions/setup-node@v1
20+
with:
21+
node-version: 12
22+
23+
# Install Dependencies
24+
- name: ⏳ Install Dependencies
25+
run: yarn install
26+
27+
# Creates Release Pull Request with help of 'Changesets'
28+
- name: 🚀 Create Release Pull Request
29+
uses: changesets/action@master
30+
env:
31+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/release.yaml

Lines changed: 78 additions & 113 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,17 @@
1-
# TODO decide weather using changesets or doing it on your own
2-
31
name: release
42
on:
5-
push:
3+
pull_request:
64
branches:
75
- master
6+
types: [closed]
87

98
jobs:
10-
release:
11-
name: Release
9+
publish:
10+
name: Publish
1211
runs-on: ubuntu-latest
1312
steps:
1413

15-
# Checkout Project
14+
# Checkout Project
1615
- name: 📚 Checkout
1716
uses: actions/checkout@v2
1817

@@ -23,116 +22,82 @@ jobs:
2322
node-version: 12
2423

2524
# Install Dependencies
26-
- name: ⏳ Install Dependencies
25+
- name: ⏳ Install
2726
run: yarn install
2827

29-
# Creates Release Pull Request with help of 'Changesets'
30-
- name: 🚀 Create Release Pull Request
31-
uses: changesets/action@master
28+
# Configure Git User so that it can perform Git Actions like commits
29+
- name: 👷 Configure Git User
30+
run: |
31+
git config --global user.name 'bennodev19'
32+
git config --global user.email 'bennodev19@users.noreply.github.com'
3233
env:
3334
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
3435

35-
# -- OLD --
36-
#
37-
# name: release
38-
# on:
39-
# pull_request:
40-
# branches:
41-
# - master
42-
#
43-
# jobs:
44-
# publish:
45-
# name: Publish
46-
# runs-on: ubuntu-latest
47-
# steps:
48-
49-
# # Checkout Project
50-
# - name: 📚 Checkout
51-
# uses: actions/checkout@v2
52-
53-
# # Setup NodeJS
54-
# - name: 🟢 Setup Node ${{ matrix.node_version }}
55-
# uses: actions/setup-node@v1
56-
# with:
57-
# node-version: 12
58-
59-
# # Install Dependencies
60-
# - name: ⏳ Install Dependencies
61-
# run: yarn install
62-
63-
# # Configure Git User so that it can perform Git Actions like commits
64-
# - name: 👷 Configure Git User
65-
# run: |
66-
# git config --global user.name 'bennodev19'
67-
# git config --global user.email 'bennodev19@users.noreply.github.com'
68-
# env:
69-
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
70-
71-
# # Define ${CURRENT_VERSION}
72-
# - name: 🔑 Set Current Version
73-
# shell: bash -ex {0}
74-
# run: |
75-
# CURRENT_VERSION=$(node -p 'require("./lerna.json").version')
76-
# echo "CURRENT_VERSION=${CURRENT_VERSION}" >> $GITHUB_ENV
77-
78-
# # Check if Tag with the CURRENT_VERSION already exists
79-
# - name: Tag Check
80-
# id: tag-check
81-
# shell: bash -ex {0}
82-
# run: |
83-
# GET_API_URL="https://api.github.com/repos/${GITHUB_REPOSITORY}/git/ref/tags/v${CURRENT_VERSION}"
84-
# http_status_code=$(curl -LI $GET_API_URL -o /dev/null -w '%{http_code}\n' -s \
85-
# -H "Authorization: token ${GITHUB_TOKEN}")
86-
# if [ "$http_status_code" -ne "404" ] ; then
87-
# echo "::set-output name=exists_tag::true"
88-
# else
89-
# echo "::set-output name=exists_tag::false"
90-
# fi
91-
# env:
92-
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
93-
94-
# # Create Git Tag if Tag doesn't already exists
95-
# - name: 🏷 Create Git Tag
96-
# if: steps.tag-check.outputs.exists_tag == 'false'
97-
# uses: azu/action-package-version-to-git-tag@v1
98-
# with:
99-
# version: ${{ env.CURRENT_VERSION }}
100-
# github_token: ${{ secrets.GITHUB_TOKEN }}
101-
# github_repo: ${{ github.repository }}
102-
# git_commit_sha: ${{ github.sha }}
103-
# git_tag_prefix: "v"
104-
105-
# # Create Release
106-
# - name: 📝 Create Release
107-
# id: create-release
108-
# if: steps.tag-check.outputs.exists_tag == 'false' && github.event.pull_request.merged == true
109-
# uses: actions/create-release@v1
110-
# env:
111-
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
112-
# with:
113-
# tag_name: v${{ env.CURRENT_VERSION }}
114-
# # Copy Pull Request's tile and body to Release Note
115-
# release_name: ${{ github.event.pull_request.title }}
116-
# body: |
117-
# ${{ github.event.pull_request.body }}
118-
# draft: false
119-
# prerelease: false
36+
# Define ${CURRENT_VERSION}
37+
- name: 🔑 Set Current Version
38+
shell: bash -ex {0}
39+
run: |
40+
CURRENT_VERSION=$(node -p 'require("./lerna.json").version')
41+
echo "CURRENT_VERSION=${CURRENT_VERSION}" >> $GITHUB_ENV
42+
43+
# Check if Tag with the CURRENT_VERSION already exists
44+
- name: Tag Check
45+
id: tag-check
46+
shell: bash -ex {0}
47+
run: |
48+
GET_API_URL="https://api.github.com/repos/${GITHUB_REPOSITORY}/git/ref/tags/v${CURRENT_VERSION}"
49+
http_status_code=$(curl -LI $GET_API_URL -o /dev/null -w '%{http_code}\n' -s \
50+
-H "Authorization: token ${GITHUB_TOKEN}")
51+
if [ "$http_status_code" -ne "404" ] ; then
52+
echo "::set-output name=exists_tag::true"
53+
else
54+
echo "::set-output name=exists_tag::false"
55+
fi
56+
env:
57+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
12058

121-
# # Publish
122-
# - name: 🚀 Publish
123-
# if: steps.tag-check.outputs.exists_tag == 'false'
124-
# run: |
125-
# yarn lerna publish from-package --yes
126-
# env:
127-
# GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
128-
# NODE_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }}
129-
# - uses: actions/github-script@0.8.0
130-
# with:
131-
# github-token: ${{secrets.GITHUB_TOKEN}}
132-
# script: |
133-
# github.issues.createComment({
134-
# issue_number: context.issue.number,
135-
# owner: context.repo.owner,
136-
# repo: context.repo.repo,
137-
# body: 'https://github.com/${{ github.repository }}/releases/tag/v${{ env.CURRENT_VERSION }} is released 🎉'
138-
# })
59+
# Create Git Tag if Tag doesn't already exists
60+
- name: 🏷 Create Git Tag
61+
if: steps.tag-check.outputs.exists_tag == 'false'
62+
uses: azu/action-package-version-to-git-tag@v1
63+
with:
64+
version: ${{ env.CURRENT_VERSION }}
65+
github_token: ${{ secrets.GITHUB_TOKEN }}
66+
github_repo: ${{ github.repository }}
67+
git_commit_sha: ${{ github.sha }}
68+
git_tag_prefix: "v"
69+
70+
# Create Release
71+
- name: 📝 Create Release
72+
id: create-release
73+
if: steps.tag-check.outputs.exists_tag == 'false' && github.event.pull_request.merged == true
74+
uses: actions/create-release@v1
75+
env:
76+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
77+
with:
78+
tag_name: v${{ env.CURRENT_VERSION }}
79+
# Copy Pull Request's tile and body to Release Note
80+
release_name: ${{ github.event.pull_request.title }}
81+
body: |
82+
${{ github.event.pull_request.body }}
83+
draft: false
84+
prerelease: false
85+
86+
# Publish
87+
- name: 🚀 Publish
88+
if: steps.tag-check.outputs.exists_tag == 'false'
89+
run: |
90+
yarn lerna publish from-package --yes
91+
env:
92+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
93+
NODE_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }}
94+
- uses: actions/github-script@0.8.0
95+
with:
96+
github-token: ${{secrets.GITHUB_TOKEN}}
97+
script: |
98+
github.issues.createComment({
99+
issue_number: context.issue.number,
100+
owner: context.repo.owner,
101+
repo: context.repo.repo,
102+
body: 'https://github.com/${{ github.repository }}/releases/tag/v${{ env.CURRENT_VERSION }} is released 🎉'
103+
})

lerna.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,5 @@
33
"packages/*"
44
],
55
"useWorkspaces": true,
6-
"version": "1.0.3"
6+
"version": "independent"
77
}

packages/mono-one/CHANGELOG.md

Lines changed: 47 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,22 +3,67 @@
33
All notable changes to this project will be documented in this file.
44
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
55

6-
## 1.0.3 (2020-12-10)
6+
## 1.0.4 (2020-12-11)
7+
8+
9+
10+
## 1.0.1 (2020-12-10)
11+
12+
13+
14+
## 0.0.2 (2020-12-10)
15+
16+
17+
18+
## 0.0.1 (2020-12-10)
719

820
**Note:** Version bump only for package @bennodev/mono-one
921

1022

1123

1224

1325

14-
## 1.0.2 (2020-12-10)
26+
## 1.0.3 (2020-12-11)
27+
28+
29+
30+
## 1.0.1 (2020-12-10)
31+
32+
33+
34+
## 0.0.2 (2020-12-10)
35+
36+
37+
38+
## 0.0.1 (2020-12-10)
39+
40+
**Note:** Version bump only for package @bennodev/mono-one
41+
42+
43+
44+
45+
46+
## 1.0.2 (2020-12-11)
47+
48+
49+
50+
## 1.0.1 (2020-12-10)
51+
52+
53+
54+
## 0.0.2 (2020-12-10)
55+
56+
57+
58+
## 0.0.1 (2020-12-10)
1559

1660
**Note:** Version bump only for package @bennodev/mono-one
1761

1862

1963

2064

2165

66+
2267
## [1.0.1](https://github.com/agile-ts/github-actions-test/compare/v0.0.2...v1.0.1) (2020-12-10)
2368

2469
**Note:** Version bump only for package @bennodev/mono-one

packages/mono-one/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@bennodev/mono-one",
3-
"version": "1.0.3",
3+
"version": "1.0.4",
44
"author": "BennoDev",
55
"license": "ISC",
66
"homepage": "https://agile-ts.org/",

packages/mono-one/src/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,6 @@ export default class MonoOne {
1111
}
1212

1313
public getRandomString():string {
14-
return "random5";
14+
return "random8";
1515
}
1616
}

packages/mono-two/CHANGELOG.md

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,22 +3,27 @@
33
All notable changes to this project will be documented in this file.
44
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
55

6-
## 1.0.3 (2020-12-10)
6+
## 1.0.2 (2020-12-11)
7+
78

8-
**Note:** Version bump only for package @bennodev/mono-two
99

10+
## 1.0.1 (2020-12-10)
1011

1112

1213

14+
## 0.0.2 (2020-12-10)
15+
1316

14-
## 1.0.2 (2020-12-10)
17+
18+
## 0.0.1 (2020-12-10)
1519

1620
**Note:** Version bump only for package @bennodev/mono-two
1721

1822

1923

2024

2125

26+
2227
## [1.0.1](https://github.com/agile-ts/github-actions-test/compare/v0.0.2...v1.0.1) (2020-12-10)
2328

2429
**Note:** Version bump only for package @bennodev/mono-two

packages/mono-two/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@bennodev/mono-two",
3-
"version": "1.0.3",
3+
"version": "1.0.2",
44
"author": "BennoDev",
55
"license": "ISC",
66
"homepage": "https://agile-ts.org/",

packages/mono-two/src/index.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,9 @@ export default class MonoTwo {
99
this.name = value;
1010
return this;
1111
}
12+
13+
14+
public getRandomString():string {
15+
return "random0";
16+
}
1217
}

0 commit comments

Comments
 (0)