mirror of
https://github.com/robinraju/release-downloader.git
synced 2026-10-04 08:54:36 +03:00
* Change GH actions workflow to use matrix strategy and use macos and windows runners * Fix directory path * Set shell to bash on all runners
66 lines
1.3 KiB
YAML
66 lines
1.3 KiB
YAML
name: "Build and Test"
|
|
on:
|
|
# Trigger manually
|
|
workflow_dispatch:
|
|
pull_request:
|
|
push:
|
|
tags:
|
|
- "*"
|
|
branches:
|
|
- main
|
|
|
|
jobs:
|
|
build:
|
|
strategy:
|
|
matrix:
|
|
os:
|
|
- ubuntu-latest
|
|
- macos-latest
|
|
- windows-latest
|
|
runs-on: ${{ matrix.os }}
|
|
|
|
steps:
|
|
|
|
- name: Checkout Repo
|
|
uses: actions/checkout@v3
|
|
|
|
- name: Setup node and cache dependencies
|
|
uses: actions/setup-node@v3
|
|
with:
|
|
node-version: 16
|
|
cache: 'npm'
|
|
|
|
- name: Build and test
|
|
run: |
|
|
npm ci
|
|
npm run all
|
|
|
|
- name: Run action
|
|
uses: ./
|
|
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: Test download from a private repo
|
|
uses: ./
|
|
with:
|
|
repository: "robinraju/release-downloader-test"
|
|
latest: true
|
|
fileName: "*"
|
|
tarBall: true
|
|
zipBall: true
|
|
token: ${{ secrets.RELEASE_DOWNLOADER_TEST_TOKEN }}
|
|
out-file-path: "./downloader-test"
|
|
|
|
- name: List downloaded files from private repo
|
|
shell: bash
|
|
run: ls -lrth downloader-test
|