Skip to content

Commit 68db93d

Browse files
committed
Merge branch 'develop'
2 parents ec94e3a + eb99836 commit 68db93d

File tree

3 files changed

+8
-29
lines changed

3 files changed

+8
-29
lines changed

.github/workflows/release.yml

Lines changed: 6 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -82,10 +82,12 @@ jobs:
8282
prerelease: false
8383

8484
publish-docker:
85-
needs: release
85+
needs: [prepare-release, release]
8686
runs-on: ubuntu-latest
8787
steps:
8888
- uses: actions/checkout@v2
89+
with:
90+
ref: '${{ needs.prepare-release.outputs.version }}'
8991
- name: Build the Docker image
9092
run: docker build . --file Dockerfile --build-arg configuration=heroku-fr --tag docker.pkg.github.com/les-projets-cagnottes/web/web:latest
9193
- name: Login to Registry
@@ -94,10 +96,12 @@ jobs:
9496
run: docker push docker.pkg.github.com/les-projets-cagnottes/web/web:latest
9597

9698
deploy-production:
97-
needs: release
99+
needs: [prepare-release, release]
98100
runs-on: ubuntu-latest
99101
steps:
100102
- uses: actions/checkout@v2
103+
with:
104+
ref: '${{ needs.prepare-release.outputs.version }}'
101105
- name: Use Node.js 10.x
102106
uses: actions/setup-node@v1
103107
with:
@@ -133,28 +137,3 @@ jobs:
133137
key : ${{ secrets.PRODUCTION_KEY }}
134138
port: ${{ secrets.PRODUCTION_PORT }}
135139
script: (sudo chmod 755 /opt/les-projets-cagnottes/web/deployment/bin/deploy.sh) && (nohup /opt/les-projets-cagnottes/web/deployment/bin/deploy.sh ${{ steps.get_version.outputs.VERSION }} &> /opt/les-projets-cagnottes/web/deployment/bin/console.log < /dev/null &) && exit 0
136-
137-
prepare-next-version:
138-
needs: [publish-docker, deploy-production]
139-
runs-on: ubuntu-latest
140-
steps:
141-
- uses: actions/checkout@v2
142-
- name: Set up JDK
143-
uses: actions/setup-java@v1
144-
with:
145-
java-version: 13
146-
server-id: github
147-
settings-path: ${{ github.workspace }}
148-
- name: Get the version
149-
id: get_version
150-
run: "echo ::set-output name=VERSION::$(cat package.json | grep version | head -1 | awk -F: '{ print $2 }' | sed 's/[\",]//g' | tr -d '[[:space:]]')"
151-
- name: Get next version
152-
id: get_next_version
153-
run: echo ::set-output name=VERSION::$(bin/increment_version.sh -p ${{ steps.get_version.outputs.VERSION }})
154-
- name: Replace version
155-
run: "sed -i 's/\"version\": \"${{ steps.get_version.outputs.VERSION }})\"/\"version\": \"${{ steps.get_next_version.outputs.VERSION }}-SNAPSHOT\"/g' package.json"
156-
- name: Push next version
157-
run: git config user.email "${{ secrets.GIT_CONFIG_EMAIL }}" && git config user.name "${{ secrets.GIT_CONFIG_NAME }}"
158-
- run: git add pom.xml
159-
- run: git commit -m "Prepare next version"
160-
- run: git push origin

package-lock.json

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "les-projets-cagnottes",
3-
"version": "0.5.0",
3+
"version": "0.5.1-SNAPSHOT",
44
"scripts": {
55
"ng": "ng",
66
"start": "ng serve",

0 commit comments

Comments
 (0)