Skip to content

Commit

Permalink
Add Deploy workflow (#6)
Browse files Browse the repository at this point in the history
* Add Deploy workflow

- Add Deploy workflow
- Doc cleanup in CI.yml

* Fix workflow name
  • Loading branch information
kelleyma49 authored Aug 22, 2022
1 parent 448e17f commit 8f269d6
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 11 deletions.
13 changes: 2 additions & 11 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
@@ -1,28 +1,20 @@
# This is a basic workflow to help you get started with Actions

name: CI

# Controls when the workflow will run
on:
# Triggers the workflow on push or pull request events but only for the "master" branch
push:
branches: [ "master" ]
branches: ["master"]
pull_request:
branches: [ "master" ]
branches: ["master"]

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

# 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 "build"
build:
# The type of runner that the job will run on
runs-on: ubuntu-latest

# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v3

- name: Install needed software
Expand All @@ -31,4 +23,3 @@ jobs:
- name: Build module
run: ./build.ps1
shell: pwsh

29 changes: 29 additions & 0 deletions .github/workflows/Deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: Deploy

# Controls when the workflow will run
on:
# Triggers the workflow on push or pull request events but only for the "master" branch
release:
types: [created]

workflow_dispatch:

jobs:
build:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3

- name: Install needed software
run: ./.github/scripts/Install.ps1
shell: pwsh
- name: Build Crescendo module
run: ./build.ps1
shell: pwsh
- name: Publish PowerShell Module
run: ./.github/scripts/Deploy.ps1
shell: pwsh
env:
POWERSHELLGALLERY_APIKEY: ${{ secrets.POWERSHELLGALLERY_APIKEY }}
GITHUB_PRERELEASE: ${{ github.event.release.prerelease }}

0 comments on commit 8f269d6

Please sign in to comment.