Skip to content

Commit cf2810b

Browse files
authored
chore: remove semantic-release and keep script (#2946)
* chore: remove semantic-release * chore: keep workflow to be tag publish based * chore: fix typo
1 parent 4916efa commit cf2810b

3 files changed

Lines changed: 4443 additions & 9816 deletions

File tree

.github/workflows/prod-deploy.yml

Lines changed: 8 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,39 +1,23 @@
11
name: Production deploy
22

33
on:
4-
workflow_dispatch:
4+
release:
5+
types: [published]
56

67
jobs:
78
deploy-and-tarball:
89
name: Netlify deploy and tarball
9-
outputs:
10-
version: ${{ steps.vars.outputs.tag }}
1110
runs-on: ubuntu-latest
1211
steps:
1312
- name: Checkout repository
1413
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
15-
with:
16-
fetch-depth: 0
1714
- name: Setup node
1815
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
1916
with:
20-
node-version-file: ".node-version"
17+
node-version-file: '.node-version'
2118
package-manager-cache: false
2219
- name: Install dependencies
2320
run: npm ci
24-
- name: Run semantic release
25-
run: npm run semantic-release
26-
env:
27-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
28-
GIT_AUTHOR_NAME: ${{ secrets.GIT_AUTHOR_NAME }}
29-
GIT_AUTHOR_EMAIL: ${{ secrets.GIT_AUTHOR_EMAIL }}
30-
GIT_COMMITTER_NAME: ${{ secrets.GIT_AUTHOR_NAME }}
31-
GIT_COMMITTER_EMAIL: ${{ secrets.GIT_AUTHOR_EMAIL }}
32-
- name: Get version from tag
33-
id: vars
34-
run: |
35-
TAG=$(git describe --tags --abbrev=0)
36-
echo "tag=$TAG" >> $GITHUB_OUTPUT
3721
- name: Build app
3822
env:
3923
NODE_OPTIONS: '--max_old_space_size=4096'
@@ -42,7 +26,7 @@ jobs:
4226
uses: nwtgck/actions-netlify@4cbaf4c08f1a7bfa537d6113472ef4424e4eb654 # v3.0.0
4327
with:
4428
publish-dir: dist
45-
deploy-message: 'Prod deploy ${{ steps.vars.outputs.tag }}'
29+
deploy-message: 'Prod deploy ${{ github.ref_name }}'
4630
enable-commit-comment: false
4731
github-token: ${{ secrets.GITHUB_TOKEN }}
4832
production-deploy: true
@@ -52,6 +36,9 @@ jobs:
5236
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }}
5337
NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID_APP }}
5438
timeout-minutes: 1
39+
- name: Get version from tag
40+
id: vars
41+
run: echo "tag=${GITHUB_REF#refs/*/}" >> $GITHUB_OUTPUT
5542
- name: Create tar.gz
5643
run: tar -czvf cinny-${{ steps.vars.outputs.tag }}.tar.gz dist
5744
- name: Sign tar.gz
@@ -67,25 +54,19 @@ jobs:
6754
- name: Upload tagged release
6855
uses: softprops/action-gh-release@b4309332981a82ec1c5618f44dd2e27cc8bfbfda # v3.0.0
6956
with:
70-
tag_name: ${{ steps.vars.outputs.tag }}
7157
files: |
7258
cinny-${{ steps.vars.outputs.tag }}.tar.gz
7359
cinny-${{ steps.vars.outputs.tag }}.tar.gz.asc
7460
7561
publish-image:
7662
name: Push Docker image to Docker Hub, GHCR
77-
needs: deploy-and-tarball
78-
env:
79-
VERSION: ${{ needs.deploy-and-tarball.outputs.version }}
8063
runs-on: ubuntu-latest
8164
permissions:
8265
contents: read
8366
packages: write
8467
steps:
8568
- name: Checkout repository
8669
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
87-
with:
88-
fetch-depth: 0
8970
- name: Set up QEMU
9071
uses: docker/setup-qemu-action@c7c53464625b32c7a7e944ae62b3e17d2b600130 # v3.7.0
9172
- name: Set up Docker Buildx
@@ -108,14 +89,11 @@ jobs:
10889
images: |
10990
${{ secrets.DOCKER_USERNAME }}/cinny
11091
ghcr.io/${{ github.repository }}
111-
tags: |
112-
type=raw,value=${{ env.VERSION }}
113-
type=raw,value=latest
11492
- name: Build and push Docker image
11593
uses: docker/build-push-action@bcafcacb16a39f128d818304e6c9c0c18556b85f # v7.1.0
11694
with:
11795
context: .
11896
platforms: linux/amd64,linux/arm64
11997
push: true
12098
tags: ${{ steps.meta.outputs.tags }}
121-
labels: ${{ steps.meta.outputs.labels }}
99+
labels: ${{ steps.meta.outputs.labels }}

0 commit comments

Comments
 (0)