This commit is contained in:
33
.github/workflows/release.yml
vendored
Normal file
33
.github/workflows/release.yml
vendored
Normal file
@@ -0,0 +1,33 @@
|
|||||||
|
name: Release
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- main
|
||||||
|
schedule:
|
||||||
|
- cron: "0 0 * * *"
|
||||||
|
|
||||||
|
env:
|
||||||
|
NPM_USER: ${{ secrets.NPM_USER }}
|
||||||
|
NPM_PASS: ${{ secrets.NPM_PASS }}
|
||||||
|
NPM_REGISTRY: ${{ vars.NPM_REGISTRY }}
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
runs-on: win-x64
|
||||||
|
|
||||||
|
container:
|
||||||
|
image: alpine:latest
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Add packages
|
||||||
|
run: apk add git nodejs
|
||||||
|
|
||||||
|
- name: Checkout repository
|
||||||
|
uses: actions/checkout@v3
|
||||||
|
|
||||||
|
- name: Run Go release script
|
||||||
|
run: |
|
||||||
|
chmod +x ./.devcontainer/initialize.sh
|
||||||
|
./.devcontainer/initialize.sh
|
||||||
|
go run ./release.go
|
||||||
@@ -1,23 +0,0 @@
|
|||||||
stages:
|
|
||||||
- deploy
|
|
||||||
|
|
||||||
.build: &build
|
|
||||||
image: alpine:latest
|
|
||||||
stage: deploy
|
|
||||||
script:
|
|
||||||
- chmod +x ./.devcontainer/initialize.sh
|
|
||||||
- ./.devcontainer/initialize.sh
|
|
||||||
- go run ./release.go
|
|
||||||
artifacts:
|
|
||||||
expire_in: 1 week
|
|
||||||
|
|
||||||
detect-change:
|
|
||||||
rules:
|
|
||||||
- if: '$CI_COMMIT_BRANCH == "main"'
|
|
||||||
<<: *build
|
|
||||||
|
|
||||||
timer:
|
|
||||||
rules:
|
|
||||||
- if: $CI_PIPELINE_SOURCE == "schedule"
|
|
||||||
when: manual
|
|
||||||
<<: *build
|
|
||||||
Reference in New Issue
Block a user