-
Notifications
You must be signed in to change notification settings - Fork 0
36 lines (30 loc) · 930 Bytes
/
publish.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
name: Nullstone
on:
push:
tags:
- 'v*'
jobs:
publish:
runs-on: ubuntu-latest
defaults:
run:
shell: bash
steps:
# Checkout the repository to the GitHub Actions runner
- name: Checkout
uses: actions/checkout@v2
- name: Find version
id: version
run: echo ::set-output name=tag::${GITHUB_REF#refs/tags/v}
# Package files into tgz
- name: Package
run: tar -cvzf module.tgz *.tf
# Publish to nullstone
- name: Publish
env:
NULLSTONE_ORG: nullstone
NULLSTONE_MODULE: autogen-gcp-subdomain
RELEASE_VERSION: ${{ steps.version.outputs.tag }}
run: |-
curl -XPOST -F "file=@module.tgz" -H "X-Nullstone-Key: ${{ secrets.NULLSTONE_API_KEY }}" \
https://api.nullstone.io/orgs/${NULLSTONE_ORG}/modules/${NULLSTONE_MODULE}/versions?version=${RELEASE_VERSION}