Bump actions/upload-artifact from 4 to 6 #1547
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: 'build-test-release' | |
| on: | |
| workflow_dispatch: | |
| pull_request: | |
| push: | |
| branches: | |
| - main | |
| paths-ignore: | |
| - '.github/**' | |
| - 'README.md' | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - run: | | |
| npm install | |
| - run: | | |
| npm run all | |
| - uses: actions/upload-artifact@v6 | |
| with: | |
| name: action-package | |
| path: | | |
| action.yml | |
| dist/* | |
| test: | |
| runs-on: ubuntu-latest | |
| needs: build | |
| steps: | |
| - uses: actions/download-artifact@v5 | |
| with: | |
| name: action-package | |
| - uses: ./ | |
| - run: | | |
| gh --version | |
| release: | |
| if: github.event_name == 'workflow_dispatch' | |
| name: Publish new release | |
| runs-on: ubuntu-latest | |
| needs: test | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: build release | |
| run: | | |
| git config --local user.email "action@github.com" | |
| git config --local user.name "GitHub Action" | |
| npm install | |
| npm run build && npm run package | |
| git add dist | |
| git commit --allow-empty -m "new release" | |
| PACKAGE_VERSION=$(node -p "require('./package.json').version") | |
| MAIN_PACKAGE_VERSION=$(node -p "require('./package.json').version[0]") | |
| git tag -fa v$PACKAGE_VERSION -m "Update tag" | |
| git push origin v$PACKAGE_VERSION --force | |
| git tag -fa v$MAIN_PACKAGE_VERSION -m "Update tag" | |
| git push origin v$MAIN_PACKAGE_VERSION --force | |
| - name: Increment Version | |
| run: | | |
| npm version patch --force | |
| git push --force |