This is an automated email from the ASF dual-hosted git repository.

slawrence pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/daffodil-sbt.git


The following commit(s) were added to refs/heads/main by this push:
     new c019ee0  Add GitHub action to create release candidates
c019ee0 is described below

commit c019ee0681d7c7ea3a76e1b35c99d19c52263640
Author: Steve Lawrence <[email protected]>
AuthorDate: Thu Feb 27 08:30:15 2025 -0500

    Add GitHub action to create release candidates
    
    Adds a new "Release Candidate" workflow that uses the new GitHub action
    and is triggered when a release candidate tag is created. This
    simplifies the release candidate process to just pushing a single signed
    tag. Workflow dispatch is allowed for testing, but it will not publish
    anything.
    
    DAFFODIL-2971
---
 .github/workflows/release-candidate.yml | 70 +++++++++++++++++++++++++++++++++
 VERSION                                 |  1 +
 build.sbt                               |  5 ++-
 3 files changed, 74 insertions(+), 2 deletions(-)

diff --git a/.github/workflows/release-candidate.yml 
b/.github/workflows/release-candidate.yml
new file mode 100644
index 0000000..591c5d7
--- /dev/null
+++ b/.github/workflows/release-candidate.yml
@@ -0,0 +1,70 @@
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+name: Release Candidate
+
+# We build release candidates using GitHub actions when a rc* tag is pushed.
+# Once the vote passes for a release candidate we promote that candidate to the
+# final release--we do not do a new build for final release tags. When
+# triggered via workflow_dispatch the release candidate action disables
+# publishing regardless of the publish setting--it should be used for testing 
only
+on:
+  push:
+    tags:
+      - 'v*-rc*'
+  workflow_dispatch:
+
+jobs:
+
+  release-candidate:
+    name: Release Candidate ${{ github.ref_name }}
+    runs-on: ubuntu-22.04
+
+    steps:
+
+      - name: Checkout Repository
+        uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # 
v4.2.2
+
+      - name: ASF Release Candidate
+        id: rc
+        uses: apache/daffodil-infrastructure/actions/release-candidate@main
+        with:
+          tlp_dir: 'daffodil'
+          project_name: 'Apache Daffodil SBT Plugin'
+          project_id: 'daffodil-sbt'
+          project_dir: 'daffodil-sbt'
+          gpg_signing_key: ${{ secrets.DAFFODIL_GPG_SECRET_KEY }}
+          svn_username: ${{ secrets.DAFFODIL_SVN_DEV_USERNAME }}
+          svn_password: ${{ secrets.DAFFODIL_SVN_DEV_PASSWORD }}
+          nexus_username: ${{ secrets.NEXUS_USER }}
+          nexus_password: ${{ secrets.NEXUS_PW }}
+          publish: true
+
+      - name: Setup Java
+        uses: actions/setup-java@7a6d8a8234af8eb26422e24e3006232cccaa061b # 
v4.6.0
+        with:
+          distribution: temurin
+          java-version: 8
+          cache: sbt
+
+      # Publish jars to a staging maven repository and write helper binary
+      # artifacts to the artifact directory
+      #
+      # Note that if we are not actually publishing (the publish setting is
+      # false, this is a snapshot, etc.) then the release candidate action will
+      # have configured the system so publishSigned just goes to a local maven
+      # repository so nothing is published externally
+      - name: Create Binary Artifacts
+        run: sbt ^compile ^publishSigned
diff --git a/VERSION b/VERSION
new file mode 100644
index 0000000..f0bb29e
--- /dev/null
+++ b/VERSION
@@ -0,0 +1 @@
+1.3.0
diff --git a/build.sbt b/build.sbt
index f8c67d3..5bf37dc 100644
--- a/build.sbt
+++ b/build.sbt
@@ -19,7 +19,7 @@ name := "sbt-daffodil"
 
 organization := "org.apache.daffodil"
 
-version := "1.3.0"
+version := IO.read((ThisBuild / baseDirectory).value / "VERSION").trim
 
 scalaVersion := "2.12.19"
 
@@ -54,7 +54,8 @@ scriptedLaunchOpts ++= Seq(
 // Rat check settings
 
 ratExcludes := Seq(
-  file(".git")
+  file(".git"),
+  file("VERSION")
 )
 
 ratFailBinaries := true

Reply via email to