-
Notifications
You must be signed in to change notification settings - Fork 0
100 lines (84 loc) · 2.97 KB
/
release.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
name: Release
on:
pull_request:
branches:
- main
types: [closed]
jobs:
Release:
runs-on: ubuntu-latest
steps:
- name: 🏁 Checkout
uses: actions/checkout@v2
with:
persist-credentials: false
fetch-depth: '0'
- name: ✅ Setup node
uses: actions/setup-node@v2
with:
node-version: '18'
- name: 🏷 Bump version and push tag
uses: anothrNick/[email protected]
id: tagging
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
WITH_V: true
- name: 📝 Build Changelog
id: build_changelog
uses: mikepenz/release-changelog-builder-action@v1
with:
configuration: "pr_config.json"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: 📦 Create Release
uses: actions/create-release@v1
with:
release_name: ${{steps.tagging.outputs.tag}}
body: ${{steps.build_changelog.outputs.changelog}}
tag_name: ${{steps.tagging.outputs.tag}}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: ⬆️ Update npm package version
uses: reedyuk/[email protected]
with:
version: ${{steps.tagging.outputs.tag}}
- name: ➕ Commit files
run: |
git config --local user.email "[email protected]"
git config --local user.name "github-actions[bot]"
git add package.json
git commit -m "[release-bot] Update npm version"
- name: 💨 Push changes
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.ACCESS_TOKEN }}
branch: ${{ github.ref }}
- name: 🐳 Set up QEMU
uses: docker/setup-qemu-action@v1
- name: 🐳 Set up Docker Buildx
uses: docker/setup-buildx-action@v1
- name: 🔑 Login to DockerHub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: 🐳 Build and push version
uses: docker/build-push-action@v2
with:
context: .
push: true
tags: jpelhaw/nlp-land-frontend:${{steps.tagging.outputs.tag}}
- name: 🐳 Build and push latest
uses: docker/build-push-action@v2
with:
context: .
push: true
tags: jpelhaw/nlp-land-frontend:latest
- name: 🔑 Docker GitHub package login
run: docker login ghcr.io -u ${{ github.actor }} -p ${{ secrets.GITHUB_TOKEN }}
- name: 🐳 Build docker image
run: docker build -t ghcr.io/gipplab/cs-insights-frontend:${{steps.tagging.outputs.tag}} -t ghcr.io/gipplab/cs-insights-frontend:latest .
- name: 📦 Push docker image
run: |
docker push ghcr.io/gipplab/cs-insights-frontend:${{steps.tagging.outputs.tag}}
docker push ghcr.io/gipplab/cs-insights-frontend:latest