-
Notifications
You must be signed in to change notification settings - Fork 14
51 lines (47 loc) · 1.43 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
39
40
41
42
43
44
45
46
47
48
49
50
51
---
name: Release
on:
workflow_call:
inputs:
allowed_owner:
description: 'Only allow this owner'
required: true
type: string
working-directory:
description: The working directory where all jobs should be executed. Used for modules in subdirectories like a monorepo or a control repository.
default: '.'
required: false
type: string
secrets:
username:
description: 'The forge username to use'
required: true
api_key:
description: 'The forge API key'
required: true
env:
BUNDLE_WITHOUT: development:test:system_tests
jobs:
release:
defaults:
run:
working-directory: ${{ inputs.working-directory }}
name: 'Puppet Forge'
runs-on: ubuntu-24.04
if: github.repository_owner == inputs.allowed_owner
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Setup Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: '3.2'
bundler-cache: true
working-directory: ${{ inputs.working-directory }}
- name: Build and Release
env:
# Configure secrets here:
# https://docs.github.com/en/free-pro-team@latest/actions/reference/encrypted-secrets
BLACKSMITH_FORGE_USERNAME: '${{ secrets.username }}'
BLACKSMITH_FORGE_API_KEY: '${{ secrets.api_key }}'
run: bundle exec rake module:push