Stucco
Stucco: Start to Publish #
Creating an open source module in minutes!
Follow Along or #
Jump Ahead #
You can see the slides:
Quick Intro #
- Gilbert Sanchez
- Señor Systems Engineer at Meta
- Writing PowerShell for the last 10ish years
Agenda #
- Install Modules
- Setup Our Github Repo
- Create Our Module
- Commit
- Publish
Pre-Requisites #
If you want to follow along on your computer here’s what you should get ready.
- Github account
- Git installed
- VS Code (Recommended)
Install Stucco! #
A good starting point.
Configure Your Github Repository #
Create Repo & Check it Out #
- Pick a name, description, etc.
- Create Repository
- Check it out!
Create Your Module #
Follow the prompts
Let’s Examine #
- Repo Layout
Requirements.ps1
psakeFile.ps1
Build.ps1
Build #
Or in VS Code #
Terminal -> Run Task -> Test
Commit your code! #
Get Ready for PSGallery #
- Login to PSGallery
- Create API keys
- Copy
Put Your API Key into Github #
- Go to your new repo
- Settings
- Secrets -> Actions
- “PS_GALLERY_KEY” and paste
Time to Publish #
At this point your code should be ready to publish.
Bonus: Test Results on PR’s #
$PSBPreference.Test.OutputFormat = 'JUnitXml'
- Upload your unit tests via
upload-artifact
- Use
EnricoMi/publish-unit-test-result-action@v1
See CI.yaml
Thank you! #
Cover Photo by Avel Chuklanov on Unsplash