diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..c8cda3e --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,29 @@ +name: ci +on: + push: + branches: + - master + - main +permissions: + contents: write +jobs: + deploy: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - name: Configure Git Credentials + run: | + git config user.name github-actions[bot] + git config user.email 41898282+github-actions[bot]@users.noreply.github.com + - uses: actions/setup-python@v5 + with: + python-version: 3.x + - run: echo "cache_id=$(date --utc '+%V')" >> $GITHUB_ENV + - uses: actions/cache@v4 + with: + key: mkdocs-material-${{ env.cache_id }} + path: .cache + restore-keys: | + mkdocs-material- + - run: pip install mkdocs-material + - run: mkdocs gh-deploy --force 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/event.yml b/.github/workflows/event.yml index 0e3a2d0..8e86112 100644 --- a/.github/workflows/event.yml +++ b/.github/workflows/event.yml @@ -1,8 +1,6 @@ name: Event on: - pull_request: - types: [opened] issues: types: [opened] @@ -22,12 +20,7 @@ jobs: WEBHOOK_URL: ${{ secrets.EVENT_WEBHOOK_URL }} run: | PROJECT="${{ github.repository }}" - if [ "${{ github.event_name }}" == "issues" ]; then - EVENT_URL="${{ github.event.issue.html_url }}" - EVENT_TITLE="${{ github.event.issue.title }}" - elif [ "${{ github.event_name }}" == "pull_request" ]; then - EVENT_URL="${{ github.event.pull_request.html_url }}" - EVENT_TITLE="${{ github.event.pull_request.title }}" - fi + EVENT_URL="${{ github.event.issue.html_url }}" + EVENT_TITLE="${{ github.event.issue.title }}" - lune run .lune/discord.luau "$WEBHOOK_URL" "event" "$PROJECT" "$EVENT_TITLE" "$EVENT_URL" \ No newline at end of file + lune run .lune/discord.luau "$WEBHOOK_URL" "event" "$PROJECT" "$EVENT_TITLE" "$EVENT_URL" 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 64% rename from .github/workflows/draft.yml rename to .github/workflows/release.yml index 0a26a74..c909a51 100644 --- a/.github/workflows/draft.yml +++ b/.github/workflows/release.yml @@ -6,7 +6,9 @@ on: - 'v*.*.*' permissions: - contents: write + contents: write + 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: @@ -63,7 +65,7 @@ jobs: - name: Generate sourcemap run: argon sourcemap standalone.project.json --output sourcemap.json - - name: Generate Wally types + - name: Generate package types run: wally-package-types --sourcemap sourcemap.json Packages - name: Format code @@ -77,10 +79,50 @@ 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: bump + 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 Announcement + runs-on: ubuntu-latest + needs: [publish-package, publish-build] + 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" diff --git a/.gitignore b/.gitignore index e0df275..4d6b2b6 100644 --- a/.gitignore +++ b/.gitignore @@ -1,9 +1,5 @@ -# Vitepress -docs/.vitepress/cache -docs/.vitepress/dist - -# Node -node_modules +# Mkdocs +venv # Wally Packages @@ -11,4 +7,4 @@ DevPackages wally.lock # Argon -sourcemap.json \ No newline at end of file +sourcemap.json diff --git a/.lune/discord.luau b/.lune/discord.luau index f846af4..10ae7c0 100644 --- a/.lune/discord.luau +++ b/.lune/discord.luau @@ -2,13 +2,15 @@ local net = require("@lune/net") local process = require("@lune/process") local projectRole = "1277040514205614141" -local projectMainterRole = "1277040552012943411" local webhook_url = process.args[1] local type = process.args[2] local project = process.args[3] local projectName = string.split(project, "/")[2] +local formattedProjectName = string.gsub(projectName, "^%a", function(match) + return string.upper(match) +end) if type == "announcement" then local tag = process.args[4] @@ -21,9 +23,9 @@ if type == "announcement" then content = if noPing == true then nil else `<@&{projectRole}>`, embeds = { { - title = `Release {tag} · lumin-dev/{projectName}`, - description = `Release notification for the latest version of {projectName}`, - url = `https://github.com/lumin-dev/{projectName}/releases/tag/{tag}`, + title = `Release {tag} · {formattedProjectName}`, + description = `Release notification for the latest version of {formattedProjectName}`, + url = `https://github.com/luminlabsdev/{projectName}/releases/tag/{tag}`, color = 7506646, author = { name = "GitHub", @@ -43,18 +45,17 @@ elseif type == "event" then method = "POST", headers = { ["Content-Type"] = "application/json" }, body = net.jsonEncode({ - content = `<@&{projectMainterRole}>`, embeds = { { title = title, - description = `[View issue/pull request]({url})`, + description = `[View issue]({url})`, color = 7506646, }, }, - thread_name = `{projectName} - {title}`, + thread_name = `{formattedProjectName} - {title}`, }), }) if not response.ok then error(`{response.statusCode}:{response.statusMessage}`) end -end \ No newline at end of file +end diff --git a/README.md b/README.md index 588d1f3..63ca4bb 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ -