-
Notifications
You must be signed in to change notification settings - Fork 0
42 lines (37 loc) · 1.05 KB
/
deploy-code.yml
File metadata and controls
42 lines (37 loc) · 1.05 KB
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
name: 'Deploy'
on:
push:
branches:
- main
#pull_request:
# branches:
# - main
# types: [closed]
jobs:
validation:
name: Validate Code
uses: ./.github/workflows/validate-wf.yml
permissions:
checks: write
deploy:
name: Deploy
runs-on: ubuntu-latest
needs: validation
steps:
- name: Checkout Code
uses: actions/checkout@v3
- name: Extract Repo Name
id: repo_name
run: |
echo "repo_name=$(echo '${{ github.repository }}' | cut -d '/' -f 2)" >> $GITHUB_OUTPUT
echo ${{ steps.repo_name.outputs.repo_name }}
- name: Rename 'src' to Module Name
shell: pwsh
run: |
Rename-Item -Path ./src/ -NewName ${{ steps.repo_name.outputs.repo_name }} -Force
- name: Publish PowerShell
uses: natescherer/publish-powershell-action@v1.0.3
with:
token: ${{ secrets.PSGalleryToken }}
target: gallery
path: ${{ steps.repo_name.outputs.repo_name }}/