Skip to content

Commit e0b47b5

Browse files
authored
Merge pull request #3 from fairpm/DID-Manager-Tagged-usage
Rename release workflow to fair-release.yml
2 parents 874b981 + 3f401a2 commit e0b47b5

File tree

3 files changed

+14
-10
lines changed

3 files changed

+14
-10
lines changed

README.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ Copy all the workflow files to your repository:
2323
│ └── update-did-service.php
2424
└── workflows/
2525
├── fair-publish.yml
26-
└── release.yml # (you should already have this)
26+
└── fair-release.yml # (you should already have this)
2727
```
2828

2929
Commit and push these files:
@@ -128,7 +128,7 @@ This step is only needed once. Future publishes will automatically use this stor
128128

129129
When you create a release, here's the full flow:
130130

131-
1. **Release Workflow** (`release.yml`) runs:
131+
1. **Release Workflow** (`fair-release.yml`) runs:
132132
- Builds plugin ZIP
133133
- Creates GitHub release
134134
- Uploads ZIP as release asset
@@ -153,7 +153,7 @@ When you create a release, here's the full flow:
153153

154154
The workflow runs in two scenarios:
155155

156-
1. **Automatically after release** - Triggers when the `release.yml` workflow completes successfully (when a new tag is pushed)
156+
1. **Automatically after release** - Triggers when the `fair-release.yml` workflow completes successfully (when a new tag is pushed)
157157
2. **Manual dispatch** - Can be manually triggered from the Actions tab with an optional version parameter
158158

159159
#### Cryptographic Keys
@@ -177,7 +177,7 @@ The workflow creates a PLC DID (Decentralized Identifier) for your package:
177177
#### Package Signing and Publishing
178178

179179
For each release:
180-
1. Downloads the release ZIP created by `release.yml`
180+
1. Downloads the release ZIP created by `fair-release.yml`
181181
2. Calculates SHA-256 checksum
182182
3. Signs the package with the verification key
183183
4. Generates FAIR-compliant `metadata.json`
@@ -190,7 +190,7 @@ Before following the setup steps above, ensure you have:
190190
- A WordPress plugin with a main plugin file containing standard headers
191191
- A GitHub repository with releases enabled
192192
- PHP installed locally (for key generation)
193-
- The `release.yml` workflow (or similar) that creates releases from tags
193+
- The `fair-release.yml` workflow (or similar) that creates releases from tags
194194

195195
### Manual Publishing (Optional)
196196

@@ -230,7 +230,7 @@ The workflow requires these secrets and variables:
230230

231231
The workflow runs automatically whenever:
232232
- You push a new tag (e.g., `v1.0.0`)
233-
- The `release.yml` workflow completes successfully
233+
- The `fair-release.yml` workflow completes successfully
234234

235235
No manual intervention required after initial setup!
236236

@@ -355,7 +355,7 @@ Ensure:
355355
│ └── update-did-service.php # DID service updates
356356
└── workflows/
357357
├── fair-publish.yml # Main FAIR publishing workflow
358-
└── release.yml # GitHub release creation
358+
└── fair-release.yml # GitHub release creation
359359
```
360360

361361
## Security Considerations

workflows/fair-publish.yml

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -60,8 +60,12 @@ jobs:
6060
6161
- name: Clone FAIR DID Manager
6262
run: |
63-
git clone --branch initial-implementation --depth 1 \
63+
git clone --depth 1 \
6464
https://github.com/fairpm/did-manager.git /tmp/did-manager
65+
cd /tmp/did-manager
66+
git fetch --tags
67+
LATEST_TAG=$(git describe --tags --abbrev=0)
68+
git checkout $LATEST_TAG
6569
6670
- name: Install DID Manager dependencies
6771
working-directory: /tmp/did-manager
@@ -105,7 +109,7 @@ jobs:
105109
PLUGIN_NAME="${{ github.event.repository.name }}"
106110
ARTIFACT_PATH="/tmp/${PLUGIN_NAME}.zip"
107111
108-
# Download the release asset created by release.yml
112+
# Download the release asset created by fair-release.yml
109113
gh release download "${VERSION}" -p "${PLUGIN_NAME}.zip" -O "${ARTIFACT_PATH}"
110114
111115
echo "artifact_path=${ARTIFACT_PATH}" >> $GITHUB_OUTPUT
@@ -143,7 +147,7 @@ jobs:
143147
cat /tmp/fair-metadata.json | jq .
144148
echo "::endgroup::"
145149
146-
# Upload to the existing release created by release.yml
150+
# Upload to the existing release created by fair-release.yml
147151
gh release upload "${VERSION}" /tmp/fair-metadata.json --clobber
148152
149153
METADATA_URL="${{ github.server_url }}/${{ github.repository }}/releases/download/${VERSION}/fair-metadata.json"

0 commit comments

Comments
 (0)