Skip to content

Commit

Permalink
Update readme and workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
JohnDuprey committed Dec 16, 2022
1 parent af1fc70 commit 80a591c
Show file tree
Hide file tree
Showing 3 changed files with 41 additions and 22 deletions.
24 changes: 24 additions & 0 deletions .github/workflows/psscriptanalyzer.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: Run PSScriptAnalyzer

on:
push:
branches: [main]

jobs:
check:
name: Check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

- name: Run PSScriptAnalyzer
uses: microsoft/psscriptanalyzer-action@v1.1
with:
path: .\BitwardenPS
recurse: true
output: results.sarif

- name: Upload SARIF results file
uses: github/codeql-action/upload-sarif@v2
with:
sarif_file: results.sarif
Original file line number Diff line number Diff line change
@@ -1,29 +1,16 @@
name: Check and Publish
name: Publish New Version

on:
push:
branches: [main]
tags: '*'

jobs:
checkpublish:
name: Check and Publish
publish:
name: Publish
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

- name: Run PSScriptAnalyzer
uses: microsoft/psscriptanalyzer-action@v1.1
with:
path: .\BitwardenPS
recurse: true
includeRule: '"PSAvoidGlobalAliases", "PSAvoidUsingConvertToSecureStringWithPlainText"'
output: results.sarif

- name: Upload SARIF results file
uses: github/codeql-action/upload-sarif@v2
with:
sarif_file: results.sarif

- name: PowerShell script
uses: Amadevus/pwsh-script@v2.0.3
id: Build-Module
Expand All @@ -32,6 +19,12 @@ jobs:
Install-Module ModuleBuilder -Force
Build-Module
- name: Update Metadata
uses: natescherer/update-powershell-metadata-action@v2
with:
path: .\Output\BitwardenPS
version: ${{ github.ref_name }}

- name: Publish PowerShell Module
uses: pcgeek86/publish-powershell-module-action@v20
with:
Expand Down
12 changes: 7 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# BitwardenPS Module
[![BitwardenPSDownloads]][BitwardenPSGallery] ![BitwardenPSBuild]
[![Downloads]][Gallery] ![Build] ![Publish]

<!-- References -->
[Downloads]: https://img.shields.io/powershellgallery/dt/BitwardenPS
[Gallery]: https://www.powershellgallery.com/packages/BitwardenPS/
[Build]: https://img.shields.io/github/actions/workflow/status/johnduprey/BitwardenPS/psscriptanalyzer.yml?branch=main&label=PSScriptAnalyzer
[Publish]: https://github.com/johnduprey/BitwardenPS/actions/workflows/publish.yml/badge.svg

This module interacts with the Bitwarden Public API and the Vault API.

Expand Down Expand Up @@ -87,7 +93,3 @@ text : @{text=Super secret text; hidden=False}

This module is a work in progress. Pull requests are welcome.

<!-- References -->
[BitwardenPSDownloads]: https://img.shields.io/powershellgallery/dt/BitwardenPS
[BitwardenPSGallery]: https://www.powershellgallery.com/packages/BitwardenPS/
[BitwardenPSBuild]: https://img.shields.io/github/workflow/status/johnduprey/BitwardenPS/Check%20and%20Publish/main

0 comments on commit 80a591c

Please sign in to comment.