Files
release-downloader/.github/workflows/ci.yml
T
Robin Raju db5d0ae5fa Add macos and windows runners to build workflow (#440)
* Change GH actions workflow to use matrix strategy and use macos and windows runners

* Fix directory path

* Set shell to bash on all runners
2022-05-29 19:39:16 +02:00

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