Repository navigation
89 lines (76 loc) · 2.72 KB
/
Copy pathrelease.yml
File metadata and controls
89 lines (76 loc) · 2.72 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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
name: release
#
# This workflow will build Alloy and prepares a release.
# The private keys for signing and notarizing are kept
# secret for the project maintainers since it the certiicate
# is on a personal name. The keys are stored in the
# envionment secrets 'release'. As an extra safeguard, the
# password for the p12 key file is passed as an input
# to the workflow.
#
on:
workflow_dispatch:
inputs:
macos_signing_password:
description: "Password for p12 key file in 'release' environment secrets"
required: true
type: string
env:
LC_ALL: en_US.UTF-8
REPOSITORY_USERNAME: ${{ secrets.REPOSITORY_USERNAME }}
REPOSITORY_PASSWORD: ${{ secrets.REPOSITORY_PASSWORD }}
jobs:
build:
name: build on OpenJDK Linux
runs-on: ubuntu-latest
environment: release
steps:
- name: Mask macos_signing_password
run: echo "::add-mask::${{ inputs.macos_signing_password }}"
shell: bash
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
java-version: 17
distribution: temurin
- shell: bash
run: ./gradlew --parallel release
- if: ${{ always() }}
uses: actions/upload-artifact@v4
with:
name: test-reports
path: '*/target/*reports/tests/'
- name: Prepare macOS signing key and notary key
run: |
mkdir -p secret/mac
echo "${{ secrets.MACOS_SIGNING_KEY }}" | base64 -d > secret/mac/alloy_key_cer.p12
echo "${{ secrets.MACOS_NOTARY_KEY }}" > secret/mac/notary_key.p8
shell: bash
working-directory: org.alloytools.alloy.dist/conveyor/
- name: Run prepare.sh for Conveyor
working-directory: org.alloytools.alloy.dist/conveyor/
run: ./prepare.sh
shell: bash
- uses: hydraulic-software/conveyor/actions/build@v18.1
env:
MACOS_SIGNING_PASSWORD: ${{ inputs.macos_signing_password }}
with:
signing_key: ${{ secrets.CONVEYOR_ROOT_KEY }}
command: make site
extra_flags: -f org.alloytools.alloy.dist/conveyor/conveyor.conf
agree_to_license: 1
- name: Upload Conveyor output directory
uses: actions/upload-artifact@v4
with:
name: conveyor-output
path: output/
- name: Release
uses: softprops/action-gh-release@v2
with:
generate_release_notes: true
name: Alloy
body: Alloy is an open source language and analyzer for software modeling. It has been used in a wide range of applications, from finding holes in security mechanisms to designing telephone systems.
prerelease: false
draft: true
files: |
output/**