Skip to content

Commit 90300ea

Browse files
chore: Simplify nightly workflow and make it more like the one in c2pa-rs (contentauth/c2patool#144)
* chore: Simplify nightly workflow and make it more like the one in c2pa-rs * Restore generation of changelog for nightly builds
1 parent dbc60ed commit 90300ea

File tree

1 file changed

+6
-11
lines changed

1 file changed

+6
-11
lines changed

.github/workflows/nightly.yml

+6-11
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,6 @@ jobs:
1111
name: Create snapshot
1212
runs-on: ubuntu-latest
1313

14-
outputs:
15-
new-tag: ${{ steps.set-nightly-version.outputs.version }}
16-
1714
steps:
1815
- name: Checkout repository
1916
uses: actions/checkout@v3
@@ -24,7 +21,7 @@ jobs:
2421
- name: Get latest existing tag
2522
uses: WyriHaximus/github-action-get-previous-tag@v1
2623
id: get-latest-tag
27-
24+
2825
- name: Set new proposed version
2926
uses: paulhatch/semantic-version@v5.2.1
3027
id: set-version
@@ -52,15 +49,13 @@ jobs:
5249
run: |
5350
echo "Proposed new version: $VERSION"
5451
echo "Nightly version: $NIGHTLY_VERSION"
55-
echo "Latest tag detected: $LATEST_TAG"
5652
echo "Changelog: $CHANGELOG"
5753
env:
5854
VERSION: ${{ steps.set-version.outputs.version }}
5955
NIGHTLY_VERSION: ${{ steps.set-nightly-version.outputs.version }}
60-
LATEST_TAG: ${{ steps.get-latest-tag.outputs.tag }}
6156
CHANGELOG: ${{ steps.generate-changelog.outputs.changelog }}
6257

63-
- name: Bump crate versions
58+
- name: Bump c2patool crate version
6459
run: |
6560
sed -i "s/^version = \"[^\"]*\"$/version = \"$VERSION\"/;" Cargo.toml
6661
env:
@@ -69,15 +64,15 @@ jobs:
6964
- name: Swap in nightly c2pa-rs build
7065
run: |
7166
sed -i "s/^c2pa = { version = \"[^\"]*\",/c2pa = { git = \"https:\\/\\/github.com\\/contentauth\\/c2pa-rs.git\", branch = \"nightly\",/;" Cargo.toml
72-
67+
7368
- name: Update changelog
7469
run: |
75-
(head -8 CHANGELOG.md && echo "## $VERSION" && date "+_%d %B %Y_" && echo "" && (echo "$CHANGELOG" | sed -E 's_\(#([0-9]+)\)_([#\1](https://github.com/contentauth/c2pa-rs/pull/\1)\)_') && tail -n +9 CHANGELOG.md) > CHANGELOG.new.md
70+
(head -8 CHANGELOG.md && echo "## $VERSION" && date "+_%d %B %Y_" && echo "" && (echo "$CHANGELOG" | sed -E 's_\(#([0-9]+)\)_([#\1](https://github.com/contentauth/c2patool/pull/\1)\)_') && tail -n +9 CHANGELOG.md) > CHANGELOG.new.md
7671
mv CHANGELOG.new.md CHANGELOG.md
7772
env:
7873
VERSION: ${{ steps.set-version.outputs.version }}
7974
CHANGELOG: ${{ steps.generate-changelog.outputs.changelog }}
80-
75+
8176
- name: Install Rust toolchain
8277
uses: dtolnay/rust-toolchain@stable
8378
with:
@@ -110,7 +105,7 @@ jobs:
110105
strategy:
111106
fail-fast: false
112107
matrix:
113-
os: [macos-latest, ubuntu-latest, windows-latest]
108+
os: [windows-latest, macos-latest, ubuntu-latest]
114109
include:
115110
- os: macos-latest
116111
artifact_name: c2patool_mac_universal.zip

0 commit comments

Comments
 (0)