Skip to content

[datadog_appsec] introduce the Application Security resources #914

[datadog_appsec] introduce the Application Security resources

[datadog_appsec] introduce the Application Security resources #914

Workflow file for this run

# Copied from https://github.com/hashicorp/terraform-provider-scaffolding/blob/master/.github/workflows/release.yml
name: release
on:
pull_request:
types: [closed]
branches:
- master
permissions:
contents: write
jobs:
create_release:
name: Create release
runs-on: ubuntu-latest
if: github.event.pull_request.merged == true && startsWith(github.head_ref, 'release/')
steps:
- name: Get GitHub App token
id: get_token
uses: actions/create-github-app-token@c1a285145b9d317df6ced56c09f525b5c2b6f755
with:
app-id: ${{ secrets.PIPELINE_GITHUB_APP_ID }}
private-key: ${{ secrets.PIPELINE_GITHUB_APP_PRIVATE_KEY }}
- name: Create tag
id: create_tag
uses: actions/github-script@d7906e4ad0b1822421a7e6a35d5ca353c962f410
env:
RELEASE_BRANCH: ${{ github.head_ref }}
with:
github-token: ${{ steps.get_token.outputs.token }}
script: |
const tagName = `v${process.env.RELEASE_BRANCH.split("/")[1]}`;
await github.rest.git.createRef({
owner: context.repo.owner,
repo: context.repo.repo,
ref: `refs/tags/${tagName}`,
sha: context.payload.pull_request.merge_commit_sha,
});
core.setOutput("tag_name", tagName);
- name: Checkout
uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744
with:
ref: ${{ steps.create_tag.outputs.tag_name }}
- name: Unshallow
run: git fetch --prune --unshallow
- name: Set up Go
uses: actions/setup-go@93397bea11091df50f3d7e59dc26a7711a8bcfbe
with:
go-version: "1.23"
- name: Import GPG key
id: import_gpg
uses: paultyng/ghaction-import-gpg@53deb67fe3b05af114ad9488a4da7b782455d588
env:
GPG_PRIVATE_KEY: ${{ secrets.GPG_PRIVATE_KEY }}
PASSPHRASE: ${{ secrets.PASSPHRASE }}
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@b953231f81b8dfd023c58e0854a721e35037f28b
with:
version: latest
args: release --clean
env:
GPG_FINGERPRINT: ${{ steps.import_gpg.outputs.fingerprint }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}