File tree 1 file changed +59
-0
lines changed
1 file changed +59
-0
lines changed Original file line number Diff line number Diff line change
1
+ name : Create Release
2
+
3
+ on :
4
+ workflow_dispatch :
5
+
6
+ jobs :
7
+ release :
8
+ runs-on : ubuntu-latest
9
+
10
+ steps :
11
+ - name : Checkout code
12
+ uses : actions/checkout@v2
13
+ with :
14
+ ref : main
15
+ fetch-depth : 0
16
+
17
+ - name : Bump version and push tag
18
+ id : tag_version
19
+ uses : anothrNick/github-tag-action@v1
20
+ env :
21
+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
22
+ DEFAULT_BUMP : patch
23
+ WITH_V : true
24
+
25
+ - name : Set up Node.js
26
+ uses : actions/setup-node@v4
27
+ with :
28
+ node-version : ' 16'
29
+
30
+ - name : Set up Docker Buildx
31
+ uses : docker/setup-buildx-action@v1
32
+
33
+ - name : Login to Docker Hub
34
+ uses : docker/login-action@v1
35
+ with :
36
+ username : ${{ vars.DOCKERHUB_USERNAME }}
37
+ password : ${{ secrets.DOCKERHUB_TOKEN }}
38
+
39
+ - name : Update version in package.json
40
+ run : |
41
+ npm version ${{ steps.tag_version.outputs.new_tag }} --no-git-tag-version
42
+ cd client
43
+ npm version ${{ steps.tag_version.outputs.new_tag }} --no-git-tag-version
44
+ cd ..
45
+ git add package.json client/package.json
46
+ git commit -m "Bump version to ${{ steps.tag_version.outputs.new_tag }}"
47
+ git push
48
+
49
+ - name : Build and push Docker images
50
+ run : |
51
+ cd client
52
+ npm run build
53
+ cd ..
54
+
55
+ docker build -t ${{ vars.DOCKERHUB_USERNAME }}/youtarr:${{ steps.tag_version.outputs.new_tag }} .
56
+ docker push ${{ vars.DOCKERHUB_USERNAME }}/youtarr:${{ steps.tag_version.outputs.new_tag }}
57
+
58
+ docker tag ${{ vars.DOCKERHUB_USERNAME }}/youtarr:${{ steps.tag_version.outputs.new_tag }} ${{ vars.DOCKERHUB_USERNAME }}/youtarr:latest
59
+ docker push ${{ vars.DOCKERHUB_USERNAME }}/youtarr:latest
You can’t perform that action at this time.
0 commit comments