From 2d124df653fb1bc66be03d3a8164c516c73e14a8 Mon Sep 17 00:00:00 2001 From: AoiKamishiro Date: Sat, 19 Oct 2024 02:28:53 +0900 Subject: [PATCH] =?UTF-8?q?chor:=20CI/CD=E5=AE=9F=E8=A1=8C=E7=92=B0?= =?UTF-8?q?=E5=A2=83=E3=82=92Github=E3=81=AB=E5=A4=89=E6=9B=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/release.yml | 33 +++++++++++++++++++++++++++++++++ .gitlab-ci.yml | 23 ----------------------- 2 files changed, 33 insertions(+), 23 deletions(-) create mode 100644 .github/workflows/release.yml delete mode 100644 .gitlab-ci.yml diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..57743d0 --- /dev/null +++ b/.github/workflows/release.yml @@ -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 diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml deleted file mode 100644 index e4b1e31..0000000 --- a/.gitlab-ci.yml +++ /dev/null @@ -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 \ No newline at end of file