From 8267cebfe4d498d9acf13b59488157ec969a4fe3 Mon Sep 17 00:00:00 2001 From: James <119134081+2jammers@users.noreply.github.com> Date: Sun, 1 Sep 2024 23:21:48 -0500 Subject: [PATCH] update actions --- .github/workflows/docs.yml | 55 -------------------- .github/workflows/publish.yml | 52 ------------------ .github/workflows/{draft.yml => release.yml} | 51 ++++++++++++++++-- 3 files changed, 46 insertions(+), 112 deletions(-) delete mode 100644 .github/workflows/docs.yml delete mode 100644 .github/workflows/publish.yml rename .github/workflows/{draft.yml => release.yml} (65%) diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml deleted file mode 100644 index 324752c..0000000 --- a/.github/workflows/docs.yml +++ /dev/null @@ -1,55 +0,0 @@ -name: Documentation - -on: - release: - types: [published] - workflow_dispatch: - -permissions: - contents: read - pages: write - id-token: write - -concurrency: - group: pages - cancel-in-progress: false - -jobs: - # Build job - build-docs: - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@v4 - with: - fetch-depth: 0 - - name: Setup Node - uses: actions/setup-node@v4 - with: - node-version: 18 - cache: npm - - name: Setup Pages - uses: actions/configure-pages@v4 - - name: Install dependencies - run: npm ci - - name: Build with VitePress - run: | - npm run docs:build # or pnpm docs:build / yarn docs:build / bun run docs:build - touch docs/.vitepress/dist/.nojekyll - - name: Upload artifact - uses: actions/upload-pages-artifact@v3 - with: - path: docs/.vitepress/dist - - # Deployment job - deploy-docs: - environment: - name: github-pages - url: ${{ steps.deployment.outputs.page_url }} - needs: build-docs - runs-on: ubuntu-latest - name: Deploy - steps: - - name: Deploy to GitHub Pages - id: deployment - uses: actions/deploy-pages@v4 \ No newline at end of file diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml deleted file mode 100644 index 2f175ee..0000000 --- a/.github/workflows/publish.yml +++ /dev/null @@ -1,52 +0,0 @@ -name: Publish -on: - release: - types: [published] - workflow_dispatch: - -permissions: - contents: read - pages: write - id-token: write - -jobs: - # Announce on Discord - announce: - name: Announce on Discord - runs-on: ubuntu-latest - steps: - - name: Checkout repository - uses: actions/checkout@v4 - - - name: Setup Rokit - uses: CompeyDev/setup-rokit@v0.1.0 - - - name: Send webhook - env: - WEBHOOK_URL: ${{ secrets.UPDATE_WEBHOOK_URL }} - run: | - PROJECT="${{ github.repository }}" - VERSION="${{ github.ref_name }}" - lune run .lune/discord.luau "$WEBHOOK_URL" "announcement" "$PROJECT" "$VERSION" - - # Publish to wally - publish-wally: - name: Publish package to Wally - runs-on: ubuntu-latest - steps: - - name: Checkout repository - uses: actions/checkout@v4 - - - name: Setup Rokit - uses: CompeyDev/setup-rokit@v0.1.0 - - - name: Log In - env: - WALLY_AUTH: ${{ secrets.WALLY_AUTH_TOKEN }} - run: | - mkdir ~/.wally - printenv WALLY_AUTH > ~/.wally/auth.toml - - - name: Publish - run: | - wally publish \ No newline at end of file diff --git a/.github/workflows/draft.yml b/.github/workflows/release.yml similarity index 65% rename from .github/workflows/draft.yml rename to .github/workflows/release.yml index 0a26a74..488d7e2 100644 --- a/.github/workflows/draft.yml +++ b/.github/workflows/release.yml @@ -6,7 +6,9 @@ on: - 'v*.*.*' permissions: - contents: write + contents: read + pages: write + id-token: write jobs: bump: @@ -46,8 +48,8 @@ jobs: git tag -f ${{ github.ref_name }} git push -f --tags - draft-build: - name: Draft & Build Assets + publish-build: + name: Publish Assets runs-on: ubuntu-latest needs: bump steps: @@ -77,10 +79,49 @@ jobs: with: tag_name: ${{ github.ref_name }} name: ${{ github.ref_name }} - draft: true prerelease: ${{ contains(github.ref_name, 'rc') }} body: | ## Changelog ${{ needs.bump.outputs.release-body }} files: | - ./Standalone.rbxm \ No newline at end of file + ./Standalone.rbxm + + publish-package: + name: Publish Package + runs-on: ubuntu-latest + needs: publish-build + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Setup Rokit + uses: CompeyDev/setup-rokit@v0.1.0 + + - name: Log In + env: + WALLY_AUTH: ${{ secrets.WALLY_AUTH_TOKEN }} + run: | + mkdir ~/.wally + printenv WALLY_AUTH > ~/.wally/auth.toml + + - name: Publish + run: | + wally publish + + publish-announcement: + name: Publish Announce + runs-on: ubuntu-latest + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Setup Rokit + uses: CompeyDev/setup-rokit@v0.1.0 + + - name: Send webhook + env: + WEBHOOK_URL: ${{ secrets.UPDATE_WEBHOOK_URL }} + run: | + PROJECT="${{ github.repository }}" + VERSION="${{ github.ref_name }}" + lune run .lune/discord.luau "$WEBHOOK_URL" "announcement" "$PROJECT" "$VERSION" \ No newline at end of file