diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 180c43a..33f762c 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -1,10 +1,9 @@ name: Publish Package to npmjs on: - workflow_run: - workflows: ['Test Pipeline'] - types: - - completed + push: + branches: + - release jobs: build: @@ -18,6 +17,7 @@ jobs: release: runs-on: ubuntu-latest + needs: [build] permissions: contents: read id-token: write @@ -41,6 +41,7 @@ jobs: tags: runs-on: ubuntu-latest + needs: [release] steps: - uses: actions/checkout@v4 - name: Install dependencies @@ -53,7 +54,7 @@ jobs: - name: Setup GitHub credentials for pushing tags run: | git remote set-url origin https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/adityadarma/adonis-datatables.git - git checkout main + git checkout release - name: Create GitHub tag run: | git config user.name "github-actions[bot]" @@ -62,21 +63,21 @@ jobs: git push origin "v${{ env.VERSION }}" env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - name: Get merged commits from last tag to current - id: logs - run: | - LAST_TAG=$(git describe --tags --abbrev=0) - echo "Last tag: $LAST_TAG" - LOGS=$(git log ${LAST_TAG}..HEAD --oneline) - echo "LOGS=$LOGS" >> $GITHUB_ENV + # - name: Get merged commits from last tag to current + # id: logs + # run: | + # LAST_TAG=$(git describe --tags --abbrev=0) + # echo "Last tag: $LAST_TAG" + # LOGS=$(git log ${LAST_TAG}..HEAD --oneline) + # echo "LOGS=$LOGS" >> $GITHUB_ENV - - name: Create GitHub release - uses: actions/create-release@v1 - with: - tag_name: "v${{ env.VERSION }}" - release_name: "Release v${{ env.VERSION }}" - body: ${{ env.LOGS }} - draft: false - prerelease: false - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + # - name: Create GitHub release + # uses: actions/create-release@v1 + # with: + # tag_name: "v${{ env.VERSION }}" + # release_name: "Release v${{ env.VERSION }}" + # body: ${{ env.LOGS }} + # draft: false + # prerelease: false + # env: + # GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 52fffb7..62cbd21 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -6,24 +6,6 @@ on: - main jobs: - lint: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - name: Install - run: npm install - - name: Run lint - run: npm run lint - - typecheck: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - name: Install - run: npm install - - name: Run typecheck - run: npm run typecheck - tests: runs-on: ${{ matrix.os }} strategy: @@ -40,23 +22,9 @@ jobs: node-version: ${{ matrix.node-version }} - name: Install run: npm install - - name: Run tests - run: npm test - - windows: - runs-on: windows-latest - strategy: - matrix: - node-version: - - 20.10.0 - - 21.x - steps: - - uses: actions/checkout@v2 - - name: Use Node.js ${{ matrix.node-version }} - uses: actions/setup-node@v1 - with: - node-version: ${{ matrix.node-version }} - - name: Install - run: npm install + - name: Run lint + run: npm run lint + - name: Run typecheck + run: npm run typecheck - name: Run tests run: npm test diff --git a/package.json b/package.json index 36cf53a..f03d945 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "@adityadarma/adonis-datatables", "description": "Package server side datatables on AdonisJS", - "version": "1.1.9", + "version": "1.1.10", "engines": { "node": ">=20.6.0" },