-
Notifications
You must be signed in to change notification settings - Fork 2
55 lines (53 loc) · 1.78 KB
/
release.yml
File metadata and controls
55 lines (53 loc) · 1.78 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
43
44
45
46
47
48
49
50
51
52
53
54
55
# .github/workflows/release.yml
name: Release
on:
pull_request:
types: [closed]
jobs:
build:
runs-on: ubuntu-latest
permissions: write-all
if: github.event.pull_request.merged
container:
image: pookmish/drupal8ci:php8.3
steps:
- name: Get Next Release
id: tag
uses: K-Phoen/semver-release-action@master
with:
release_strategy: none
release_branch: 12.x
tag_format: "12.%minor%.%patch%"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- run: echo 'Creating new release for ' ${{ steps.tag.outputs.tag }}
- name: Create Release
if: ${{ steps.tag.outputs.tag }}
uses: ncipollo/release-action@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
name: ${{ steps.tag.outputs.tag }}
tag: ${{ steps.tag.outputs.tag }}
commit: ${{ github.sha }}
generateReleaseNotes: true
makeLatest: true
- name: Install SSH key
uses: shimataro/ssh-key-action@v2
with:
key: ${{ secrets.SSH_KEY }}
name: id_rsa
known_hosts: ${{ secrets.KNOWN_HOSTS }}
if_key_exists: fail
- uses: actions/checkout@v4
with:
ref: ${{ github.sha }}
- name: Deploy Tag
if: ${{ steps.tag.outputs.tag }}
run: |
git config --system --add safe.directory '*' &&
git config --global user.email "sws-developers@lists.stanford.edu" &&
git config --global user.name "Github Actions" &&
ssh-keyscan -t rsa svn-45197.prod.hosting.acquia.com >> /root/.ssh/known_hosts &&
composer install -n &&
drush sws:artifact:deploy --tag=$(date +'%Y-%m-%d')"_"${{ steps.tag.outputs.tag }} --no-interaction