diff --git a/.github/workflows/labeler.yml b/.github/workflows/labeler.yml index 12fee65d7..fa9b4df0e 100644 --- a/.github/workflows/labeler.yml +++ b/.github/workflows/labeler.yml @@ -5,9 +5,7 @@ on: jobs: build: - runs-on: ubuntu-latest - steps: - uses: srvaroa/labeler@master with: diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 16365850f..67987cd68 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -8,9 +8,7 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 - - uses: actions/setup-node@v3 - - name: npm install and lint run: | npm install diff --git a/.github/workflows/release-please.yml b/.github/workflows/release-please.yml new file mode 100644 index 000000000..a4aa7bd24 --- /dev/null +++ b/.github/workflows/release-please.yml @@ -0,0 +1,57 @@ +on: + push: + branches: + - main +name: release-please +jobs: + release-please: + permissions: + contents: write + pull-requests: write + + runs-on: ubuntu-latest + steps: + - uses: google-github-actions/release-please-action@v3 + id: release + with: + release-type: node + package-name: youtubei.js + token: ${{ secrets.GITHUB_TOKEN }} + - uses: actions/checkout@v2 + - uses: actions/setup-node@v1 + with: + node-version: '16.x' + - name: Build for Deno + run: | + npm ci + npm run build:deno + if: ${{ steps.release.outputs.release_created }} + - name: Move Deno files + run: | + mkdir build + mv deno build/deno + cp deno.ts build/deno.ts + cp {LICENSE,README.md} build + if: ${{ steps.release.outputs.release_created }} + - name: Push to the Deno branch + uses: s0/git-publish-subdir-action@develop + env: + REPO: self + BRANCH: deno + FOLDER: ./build + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + SKIP_EMPTY_COMMITS: true + MESSAGE: "chore: ${{ steps.release.outputs.tag_name }} release" + TAG: ${{ steps.release.outputs.tag_name }}-deno + if: ${{ steps.release.outputs.release_created }} + - name: Remove Deno folder + run: rm -rf build + if: ${{ steps.release.outputs.release_created }} + - name: Install dependencies + run: npm ci + if: ${{ steps.release.outputs.release_created }} + - name: Publish package on NPM + run: npm publish + env: + NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} + if: ${{ steps.release.outputs.release_created }} \ No newline at end of file diff --git a/.github/workflows/stale.yml b/.github/workflows/stale.yml index 968c6d92f..7fd3b110d 100644 --- a/.github/workflows/stale.yml +++ b/.github/workflows/stale.yml @@ -11,9 +11,7 @@ jobs: - uses: actions/stale@v3 with: repo-token: ${{ secrets.GITHUB_TOKEN }} - stale-issue-message: 'This issue has been automatically marked as stale because it has not had - recent activity. It will be closed if no further activity occurs. Thank you - for your contributions.' + stale-issue-message: 'This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.' stale-pr-message: 'This PR has been automatically marked as stale because it has not had recent activity. Remove the stale label or comment or this will be closed in 2 days' days-before-stale: 60 days-before-close: 4 \ No newline at end of file diff --git a/.github/workflows/node.js.yml b/.github/workflows/tests.yml similarity index 82% rename from .github/workflows/node.js.yml rename to .github/workflows/tests.yml index 7040873a6..e3d8f76c7 100644 --- a/.github/workflows/node.js.yml +++ b/.github/workflows/tests.yml @@ -8,14 +8,11 @@ on: jobs: build: - runs-on: ubuntu-latest - strategy: matrix: node-version: [ 16.x, 18.x ] - # See supported Node.js release schedule at https://nodejs.org/en/about/releases/ - + steps: - uses: actions/checkout@v2 - name: Use Node.js ${{ matrix.node-version }}