Skip to content

Update CHANGELOG-SERVER.md for v137_4 release (#1359) #5

Update CHANGELOG-SERVER.md for v137_4 release (#1359)

Update CHANGELOG-SERVER.md for v137_4 release (#1359) #5

Workflow file for this run

name: Production
on:
push:
tags:
- 'v*'
- '!v*.*.*'
jobs:
push_docker_image:
name: Push docker image to ghcr.io
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to GHCR
if: github.event_name != 'pull_request'
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push
uses: docker/build-push-action@v6
with:
context: .
push: true
platforms: linux/amd64,linux/arm64
tags: ghcr.io/esm-dev/esm.sh:latest,ghcr.io/esm-dev/esm.sh:${{ github.ref_name }}
build-args: SERVER_VERSION=${{ github.ref_name }}
env:
DOCKER_BUILD_RECORD_UPLOAD: false
deploy_server:
name: Deploy server to production
runs-on: ubuntu-latest
environment: esm.sh
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Go
uses: actions/setup-go@v5
with:
go-version: 1.26.x
- name: Run Deploy Script
run: ./scripts/deploy-ci.sh
env:
GOOS: ${{ secrets.DEPLOY_HOST_OS }}
GOARCH: ${{ secrets.DEPLOY_HOST_ARCH }}
DEPLOY_HOST: ${{ secrets.DEPLOY_HOST }}
DEPLOY_SSH_PORT: ${{ secrets.DEPLOY_SSH_PORT }}
DEPLOY_SSH_USER: ${{ secrets.DEPLOY_SSH_USER }}
DEPLOY_SSH_PRIVATE_KEY: ${{ secrets.DEPLOY_SSH_PRIVATE_KEY }}
SERVER_CONFIG: ${{ secrets.SERVER_CONFIG }}
SERVER_VERSION: ${{ github.ref_name }}
release:
name: Release
runs-on: ubuntu-latest
needs: [push_docker_image,deploy_server]
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Extract Release Note
run: echo "console.log(require('fs').readFileSync('CHANGELOG-SERVER.md','utf8').split('## ')[1].slice('${{ github.ref_name }}'.length).trim())" | node > release-note.txt
- name: Release
uses: softprops/action-gh-release@v2
with:
body_path: release-note.txt