mirror of
https://github.com/robinraju/release-downloader.git
synced 2026-10-04 08:54:36 +03:00
Bumps [actions/checkout](https://github.com/actions/checkout) from 6 to 7. - [Release notes](https://github.com/actions/checkout/releases) - [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md) - [Commits](https://github.com/actions/checkout/compare/v6...v7) --- updated-dependencies: - dependency-name: actions/checkout dependency-version: '7' dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
107 lines
2.7 KiB
YAML
107 lines
2.7 KiB
YAML
name: pr_validation
|
|
|
|
on:
|
|
pull_request:
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
jobs:
|
|
build:
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
os:
|
|
- ubuntu-latest
|
|
- macos-latest
|
|
- windows-latest
|
|
runs-on: ${{ matrix.os }}
|
|
|
|
steps:
|
|
- name: Checkout Repo
|
|
uses: actions/checkout@v7
|
|
with:
|
|
fetch-depth: 0
|
|
|
|
- name: Reject committed dist changes
|
|
shell: bash
|
|
run: |
|
|
# Block humans from committing built artifacts (additions/modifications).
|
|
dist_changes="$(git diff --name-only --diff-filter=AM \
|
|
"${{ github.event.pull_request.base.sha }}"..HEAD -- dist)"
|
|
|
|
if [ -n "$dist_changes" ]; then
|
|
echo "dist/ is CI-managed and must not be added or modified in pull requests."
|
|
echo "Changed dist files:"
|
|
echo "$dist_changes"
|
|
exit 1
|
|
fi
|
|
|
|
- name: Setup node and cache dependencies
|
|
uses: actions/setup-node@v6
|
|
with:
|
|
node-version-file: '.node-version'
|
|
cache: 'npm'
|
|
|
|
- name: Validate source
|
|
shell: bash
|
|
run: |
|
|
npm ci
|
|
npm run verify
|
|
|
|
- name: Download public release asset
|
|
uses: ./
|
|
id: download-public
|
|
with:
|
|
repository: 'robinraju/probable-potato'
|
|
tag: '1.0.1'
|
|
fileName: 'potato.jpeg'
|
|
tarBall: true
|
|
zipBall: true
|
|
out-file-path: './test-downloads'
|
|
|
|
- name: List downloaded files
|
|
shell: bash
|
|
run: ls -lrth test-downloads
|
|
|
|
- name: Download tarball and zipball only
|
|
uses: ./
|
|
with:
|
|
repository: 'robinraju/probable-potato'
|
|
tag: '1.0.2'
|
|
tarBall: true
|
|
zipBall: true
|
|
out-file-path: './public-download'
|
|
|
|
- name: List downloaded archive files
|
|
shell: bash
|
|
run: ls -lrth public-download
|
|
|
|
- name: Test download latest pre-release
|
|
uses: ./
|
|
with:
|
|
repository: 'robinraju/probable-potato'
|
|
latest: true
|
|
preRelease: true
|
|
fileName: 'prerelease.txt'
|
|
tarBall: true
|
|
zipBall: true
|
|
out-file-path: './prerelease-downloads'
|
|
|
|
- name: List prerelease downloads
|
|
shell: bash
|
|
run: ls -lrth prerelease-downloads
|
|
|
|
- name: Read public integration outputs
|
|
shell: bash
|
|
run: |
|
|
if [ -n "${{ steps.download-public.outputs.tag_name }}" ]; then
|
|
echo "${{ steps.download-public.outputs.tag_name }}"
|
|
else
|
|
echo "Unable to read output variable from step download-public"
|
|
exit 1
|
|
fi
|
|
|
|
echo "Downloaded public files:"
|
|
echo '${{ steps.download-public.outputs.downloaded_files }}'
|