-
Notifications
You must be signed in to change notification settings - Fork 37
38 lines (33 loc) · 1.59 KB
/
release.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
name: Release
on:
release:
types: [published]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Publish
shell: pwsh
run: |
Publish-Module -Path ./PowerFGT -NuGetApiKey ${{ secrets.PSGALLERY_API_KEY }}
- name: Install BlueBirdPS
shell: pwsh
run: |
Set-PSRepository PSGallery -InstallationPolicy Trusted
Install-Module BlueBirdPS
Import-Module BlueBirdPS
- name: Configure BlueBirdPS and Publish Tweet
shell: pwsh
run: |
Set-TwitterAuthentication -ApiKey (ConvertTo-SecureString $ENV:TWITTER_CONSUMER_API_KEY -AsPlainText -Force) `
-ApiSecret (ConvertTo-SecureString $ENV:TWITTER_CONSUMER_API_SECRET -AsPlainText -Force) `
-AccessToken (ConvertTo-SecureString $ENV:TWITTER_ACCESS_TOKEN -AsPlainText -Force) `
-AccessTokenSecret (ConvertTo-SecureString $ENV:TWITTER_ACCESS_TOKEN_SECRET -AsPlainText -Force)
Publish-Tweet -TweetText "New ${{ github.event.repository.name }} release ${{ github.event.release.tag_name }}! More information => ${{ github.event.release.html_url }} #PowerFGT @Fortinet"
env:
# Get your tokens from https://developer.twitter.com/apps
TWITTER_CONSUMER_API_KEY: ${{ secrets.TWITTER_CONSUMER_API_KEY }}
TWITTER_CONSUMER_API_SECRET: ${{ secrets.TWITTER_CONSUMER_API_SECRET }}
TWITTER_ACCESS_TOKEN: ${{ secrets.TWITTER_ACCESS_TOKEN }}
TWITTER_ACCESS_TOKEN_SECRET: ${{ secrets.TWITTER_ACCESS_TOKEN_SECRET }}