Skip to content

Commit 0827b64

Browse files
committed
centralize version tagging
1 parent 2d3f28a commit 0827b64

File tree

1 file changed

+30
-17
lines changed

1 file changed

+30
-17
lines changed

.github/workflows/deployment.yml

Lines changed: 30 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ on:
55
types: [created]
66

77
jobs:
8-
server:
8+
bump-version:
99
name: Deploy editor/server
1010
environment: SLS
1111
runs-on: ubuntu-latest
@@ -19,7 +19,32 @@ jobs:
1919
run: git config --global user.name "GitHub CD bot"
2020

2121
- name: Set bot git config email
22-
run: git config --global user.email "github-cd-bot@actuallycolab.org"
22+
run: git config --global user.email "github-cd-bot@actuallycolab.org"
23+
24+
- name: Set up Node.js
25+
uses: actions/setup-node@v1
26+
with:
27+
node-version: 12
28+
always-auth: true
29+
registry-url: 'https://registry.npmjs.org'
30+
31+
- name: Install dependencies for root
32+
run: yarn install --frozen-lockfile
33+
34+
- name: Create a new release version
35+
run: yarn version --new-version ${{ github.event.release.tag_name }}
36+
env:
37+
github-token: ${{ secrets.GITHUB_TOKEN }}
38+
39+
server:
40+
name: Deploy editor/server
41+
environment: SLS
42+
runs-on: ubuntu-latest
43+
steps:
44+
- name: Check out Git repository
45+
uses: actions/checkout@v2
46+
with:
47+
ref: ${{ github.event.release.target_commitish }}
2348

2449
- name: Configure AWS Credentials
2550
uses: aws-actions/configure-aws-credentials@v1
@@ -67,7 +92,7 @@ jobs:
6792
working-directory: ./server
6893

6994
- name: Create a new release version
70-
run: yarn version --new-version ${{ github.event.release.tag_name }}
95+
run: yarn version --new-version ${{ github.event.release.tag_name }} --no-git-tag-version
7196
working-directory: ./server
7297
env:
7398
github-token: ${{ secrets.GITHUB_TOKEN }}
@@ -88,12 +113,6 @@ jobs:
88113
with:
89114
ref: ${{ github.event.release.target_commitish }}
90115

91-
- name: Set bot git config name
92-
run: git config --global user.name "GitHub CD bot"
93-
94-
- name: Set bot git config email
95-
run: git config --global user.email "github-cd-bot@actuallycolab.org"
96-
97116
- name: Set up Node.js
98117
uses: actions/setup-node@v1
99118
with:
@@ -106,7 +125,7 @@ jobs:
106125
working-directory: ./types
107126

108127
- name: Create a new release version
109-
run: yarn version --new-version ${{ github.event.release.tag_name }}
128+
run: yarn version --new-version ${{ github.event.release.tag_name }} --no-git-tag-version
110129
working-directory: ./types
111130
env:
112131
github-token: ${{ secrets.GITHUB_TOKEN }}
@@ -127,12 +146,6 @@ jobs:
127146
with:
128147
ref: ${{ github.event.release.target_commitish }}
129148

130-
- name: Set bot git config name
131-
run: git config --global user.name "GitHub CD bot"
132-
133-
- name: Set bot git config email
134-
run: git config --global user.email "github-cd-bot@actuallycolab.org"
135-
136149
- name: Set up Node.js
137150
uses: actions/setup-node@v1
138151
with:
@@ -145,7 +158,7 @@ jobs:
145158
working-directory: ./client
146159

147160
- name: Create a new release version
148-
run: yarn version --new-version ${{ github.event.release.tag_name }}
161+
run: yarn version --new-version ${{ github.event.release.tag_name }} --no-git-tag-version
149162
working-directory: ./client
150163
env:
151164
github-token: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)