-
Notifications
You must be signed in to change notification settings - Fork 0
59 lines (50 loc) · 1.62 KB
/
Copy pathrelease.yml
File metadata and controls
59 lines (50 loc) · 1.62 KB
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
name: Release
on:
workflow_dispatch:
push:
branches:
- next
env:
REGISTRY: ghcr.io
IMAGE_NAME: geostyler/geostyler-docusaurus
jobs:
release:
name: Release
runs-on: ubuntu-latest
steps:
- name: Checkout sources 🔰
uses: actions/checkout@v4
- name: Setup Node.js 24 👷🏻
uses: actions/setup-node@v4
with:
node-version: 24
- name: Install dependencies ⏬
run: npm ci
- name: Build artifacts 🏗️
run: npm run build
- name: Release 🚀
uses: cycjimmy/semantic-release-action@v4.2.2
id: semantic
env:
# We use a PAT here since GITHUB_TOKEN does not
# trigger other workflows (e.g. updating gh-pages,
# notification to Discord, etc.)
# Those tokens are organization level secrets
GITHUB_TOKEN: ${{ secrets.GH_RELEASE_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: Log in to the Container registry
if: steps.semantic.outputs.new_release_published == 'true'
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push Docker image
if: steps.semantic.outputs.new_release_published == 'true'
uses: docker/build-push-action@v6
with:
context: .
push: true
tags: |
${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:latest
${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ steps.semantic.outputs.new_release_version }}