-
Notifications
You must be signed in to change notification settings - Fork 40
76 lines (75 loc) · 2.92 KB
/
plugin-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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
on:
push:
tags:
- 'desktop-v*'
jobs:
rubygems-release:
if: github.repository == 'hashicorp/vagrant-vmware-desktop-builder'
name: Vagrant VMware Desktop RubyGems Release
runs-on: ['self-hosted', 'ondemand', 'linux', 'type=t3.small']
permissions:
id-token: write
contents: write
steps:
- name: Authentication
id: vault-auth
run: vault-auth
- name: Secrets
id: secrets
uses: hashicorp/vault-action@v2
with:
url: ${{ steps.vault-auth.outputs.addr }}
caCertificate: ${{ steps.vault-auth.outputs.ca_certificate }}
token: ${{ steps.vault-auth.outputs.token }}
secrets:
kv/data/github/hashicorp/vagrant-vmware-desktop-builder rubygems_api_key;
kv/data/github/hashicorp/vagrant-vmware-desktop-builder vagrant_vmware_desktop_builder_repo_token;
kv/data/github/hashicorp/vagrant-vmware-desktop-builder vagrant_vmware_desktop_repo_token;
- name: Code Checkout
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
with:
fetch-depth: 0
- name: Setup Ruby
uses: ruby/setup-ruby@a6e6f86333f0a2523ece813039b8b4be04560854 # v1.190.0
with:
ruby-version: ruby
- name: Build Vagrant VMware Desktop Plugin
id: build
run: ./.ci/build-plugin
- name: Create GitHub release
run: ./.ci/release-plugin-github "${GEM_ARTIFACT}"
env:
GEM_ARTIFACT: ${{ steps.build.outputs.gem-path }}
GITHUB_TOKEN: ${{ steps.secrets.outputs.vagrant_vmware_desktop_repo_token }}
- name: Publish RubyGems.org
run: ./.ci/release-rubygems "${PLUGIN_PATH}"
env:
PLUGIN_PATH: ${{ steps.build.outputs.gem-path }}
RUBYGEMS_API_KEY: ${{ steps.secrets.outputs.rubygems_api_key }}
hashigems-release:
if: github.repository == 'hashicorp/vagrant-vmware-desktop-builder'
name: Vagrant VMware Desktop HashiGems Release
needs: [rubygems-release]
runs-on: ubuntu-latest
permissions:
contents: write
id-token: write
steps:
- name: Code Checkout
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- name: Fetch Release RubyGem
id: fetch
run: ./.ci/download-release-plugin
- name: Doormat Configuration
uses: hashicorp/doormat-action@v1
with:
aws-role-arn: ${{ vars.HASHIGEMS_DOORMAT_ROLE_ARN }}
- name: Configure AWS
run: aws sts get-caller-identity
- name: Release Vagrant VMware Desktop Plugin
run: ./.ci/release-hashigems "${PLUGIN_PATH}"
env:
PLUGIN_PATH: ${{ steps.fetch.outputs.plugin-path }}
HASHIGEMS_METADATA_BUCKET: ${{ vars.HASHIGEMS_METADATA_BUCKET }}
HASHIGEMS_PUBLIC_BUCKET: ${{ vars.HASHIGEMS_PUBLIC_BUCKET }}
HASHIGEMS_CLOUDFRONT_ID: ${{ vars.HASHIGEMS_DISTRIBUTION_ID }}