From d94eb1ea7e7fe4e4a90333b3e21248c923be1627 Mon Sep 17 00:00:00 2001 From: Ethan Lane Date: Tue, 7 Jan 2025 17:40:10 +0000 Subject: [PATCH 1/2] Update test and staging pipelines so that staging applies to release and hotfix branches --- .forgejo/workflows/staging.yml | 2 ++ .forgejo/workflows/test.yml | 1 - 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.forgejo/workflows/staging.yml b/.forgejo/workflows/staging.yml index 94f3fce..ee0ede2 100644 --- a/.forgejo/workflows/staging.yml +++ b/.forgejo/workflows/staging.yml @@ -4,6 +4,8 @@ on: push: branches: - develop + - release/* + - hotfix/* jobs: build: diff --git a/.forgejo/workflows/test.yml b/.forgejo/workflows/test.yml index a70e410..9783ff4 100644 --- a/.forgejo/workflows/test.yml +++ b/.forgejo/workflows/test.yml @@ -4,7 +4,6 @@ on: push: branches: - feature/* - - hotfix/* - renovate/* - dependabot/* -- 2.45.2 From e6387248111fe35696b5375fb6ace41fc91eceeb Mon Sep 17 00:00:00 2001 From: Ethan Lane Date: Tue, 7 Jan 2025 17:48:35 +0000 Subject: [PATCH 2/2] Use artifacts for building binaries in CI --- .forgejo/workflows/publish.yml | 21 ++++++++++++++++----- .forgejo/workflows/staging.yml | 10 ++++++---- 2 files changed, 22 insertions(+), 9 deletions(-) diff --git a/.forgejo/workflows/publish.yml b/.forgejo/workflows/publish.yml index c9428ce..fee1e74 100644 --- a/.forgejo/workflows/publish.yml +++ b/.forgejo/workflows/publish.yml @@ -21,18 +21,29 @@ jobs: - run: yarn test - run: yarn lint - publish: + package: needs: build runs-on: node + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 + with: + node-version: 20.x + - run: yarn package + - name: Upload Binary + uses: actions/upload-artifact@v4 + with: + path: bin/ + if-no-files-found: error + + publish: + needs: package + runs-on: node steps: - uses: actions/checkout@v4 - uses: actions/setup-node@v4 with: node-version: 20.x - - run: yarn install --frozen-lockfile - - run: yarn build - - run: yarn package - - run: cp -r ./bin ${{ secrets.PROD_REPO_PATH }} - uses: https://github.com/JS-DevTools/npm-publish@v3 with: token: ${{ secrets.NPM_TOKEN }} \ No newline at end of file diff --git a/.forgejo/workflows/staging.yml b/.forgejo/workflows/staging.yml index ee0ede2..2e786f2 100644 --- a/.forgejo/workflows/staging.yml +++ b/.forgejo/workflows/staging.yml @@ -23,7 +23,7 @@ jobs: - run: yarn test - run: yarn lint - rsync: + package: needs: build runs-on: node steps: @@ -31,7 +31,9 @@ jobs: - uses: actions/setup-node@v4 with: node-version: 20.x - - run: yarn install --frozen-lockfile - - run: yarn build - run: yarn package - - run: cp -r ./bin ${{ secrets.STAGE_REPO_PATH }} \ No newline at end of file + - name: Upload Binary + uses: actions/upload-artifact@v4 + with: + path: bin/ + if-no-files-found: error \ No newline at end of file -- 2.45.2