54 lines
1.6 KiB
YAML
54 lines
1.6 KiB
YAML
name: On-Site VTT - Develop
|
|
run-name: Run on ${{ github.ref }}
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- develop
|
|
|
|
jobs:
|
|
build:
|
|
steps:
|
|
- name: Setup Go
|
|
uses: actions/setup-go@v3
|
|
with:
|
|
go-version: '1.20'
|
|
- name: Get current date
|
|
id: date
|
|
run: echo "::set-output name=date::$(date +'%Y-%m-%d_%H-%M-%S')"
|
|
- name: Checkout
|
|
uses: actions/checkout@v3
|
|
with:
|
|
fetch-depth: 0
|
|
- name: Replace version in module.json
|
|
uses: jacobtomlinson/gha-find-replace@v3
|
|
with:
|
|
find: "{{version}}"
|
|
replace: dev-${{ steps.date.outputs.date }}
|
|
include: "on-site-vtt/module.json"
|
|
- name: Replace branch in module.json
|
|
uses: jacobtomlinson/gha-find-replace@v3
|
|
with:
|
|
find: "{{branch}}"
|
|
replace: ${{ github.ref_name }}
|
|
include: "on-site-vtt/module.json"
|
|
- name: Pack archive
|
|
uses: montudor/action-zip@v1
|
|
with:
|
|
args: zip -r on-site-vtt.zip on-site-vtt
|
|
- name: Tag commit
|
|
uses: cipollo/release-action@v1
|
|
id: tagging
|
|
with:
|
|
custom_tag: dev-${{ steps.date.outputs.date }}
|
|
github_token: ${{ secrets.GITHUB_TOKEN }}
|
|
verbose: true
|
|
- name: publish release
|
|
uses: https://gitea.com/actions/release-action@main
|
|
with:
|
|
title: ${{ steps.tagging.outputs.new_tag }}
|
|
body: ${{ steps.tagging.outputs.changelog }}
|
|
files: on-site-vtt.zip
|
|
pre_release: true
|
|
api_key: "${{secrets.RELEASE_TOKEN}}"
|