forked from romerve/WTH-RockPaperScissorsBoom
-
Notifications
You must be signed in to change notification settings - Fork 0
54 lines (46 loc) · 2.06 KB
/
WTH-Releaser.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
# This is a basic workflow that is manually triggered
name: Manual workflow
# Controls when the action will run. Workflow runs when manually triggered using the UI
# or API.
on:
workflow_dispatch:
inputs:
wth_name:
# Friendly description to be shown in the UI instead of 'name'
description: 'WTH Name - Ex: 005-RockPaperScissorsBoom'
# Input has to be provided for the workflow to run
required: true
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "greet"
publish_artifact:
# The type of runner that the job will run on
runs-on: ubuntu-latest
env:
resourcesPath: ${{ github.event.inputs.wth_name }}/Student/Resources
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Zip
run: |
zip -r ${{ github.event.inputs.wth_name }}.zip ${{ env.resourcesPath }}
- name: Release Name
id: release-name
run: |
echo "::set-output name=release-name::$(date +%Y%m)"
- name: Create Release
# You may pin to the exact commit or the version.
# uses: ncipollo/release-action@4b71ee3b25951e6098e7434cdc485edc5b3adab2
uses: ncipollo/[email protected]
with:
# An optional flag which indicates if we should update a release if it already exists. Defaults to false.
allowUpdates: true
# An optional set of paths representing artifacts to upload to the release. This may be a single path or a comma delimited list of paths (or globs)
artifacts: '${{ github.event.inputs.wth_name }}.zip'
artifactContentType: zip
# An optional body for the release.
body: 'Release is mapped to year/month, and assets represent student resources for specified challenges'
name: ${{ github.repository }}-${{ steps.release-name.outputs.release-name }}
tag: ${{ steps.release-name.outputs.release-name }}
token: ${{ secrets.WTH_CR_PAT}}