Skip to content

Merge pull request #1616 from jumpserver/dev #367

Merge pull request #1616 from jumpserver/dev

Merge pull request #1616 from jumpserver/dev #367

Workflow file for this run

on:
push:
# Sequence of patterns matched against refs/tags
tags:
- 'v*' # Push events to matching v*, i.e. v1.0, v20.15.10
name: Create Release And Upload assets
jobs:
create-release:
name: Create Release
runs-on: ubuntu-latest
strategy:
matrix:
go_version: [ 'stable' ]
node_version: [ '20' ]
outputs:
upload_url: ${{ steps.create_release.outputs.upload_url }}
steps:
- uses: actions/checkout@v4
- uses: actions/cache@v4
with:
path: |
~/.npm
~/.cache
~/go/pkg/mod
key: ${{ runner.os }}-build-${{ github.sha }}
restore-keys: ${{ runner.os }}-build-
- name: Get version
id: get_version
run: |
TAG=$(basename ${GITHUB_REF})
echo "TAG=$TAG" >> $GITHUB_OUTPUT
- name: Create Release
id: create_release
uses: release-drafter/release-drafter@v6
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
config-name: release-config.yml
version: ${{ steps.get_version.outputs.TAG }}
tag: ${{ steps.get_version.outputs.TAG }}
- uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node_version }}
- uses: actions/setup-go@v5
with:
go-version: ${{ matrix.go_version }}
cache: false
- name: Make Build
id: make_build
run: |
make all -s && ls build
env:
VERSION: ${{ steps.get_version.outputs.TAG }}
- name: Release Upload Assets
uses: softprops/action-gh-release@v2
if: startsWith(github.ref, 'refs/tags/')
with:
draft: true
files: |
build/*.gz
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}