Skip to content

Commit

Permalink
Publish gem auth creds cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
andrew-pickin-epi committed Aug 14, 2024
1 parent ebc53a7 commit b2d1411
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 8 deletions.
6 changes: 1 addition & 5 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,4 @@ jobs:
- name: "Publish gem"
shell: bash
run: |
mkdir ~/.gem
echo '---' > ~/.gem/credentials
echo ':github: Bearer ${{ secrets.GITHUB_TOKEN }}' >> ~/.gem/credentials
chmod 0600 ~/.gem/credentials
make publish
PAT=${{ secrets.GITHUB_TOKEN }} make publish
6 changes: 3 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ SPEC=${NAME}.gemspec

all: publish

${AUTH}:
${AUTH}: ${PAT}
@mkdir -p ${HOME}/.gem
@echo '---' > ${AUTH}
@echo ':github: Bearer ${PAT}' >> ${AUTH}
Expand All @@ -37,9 +37,9 @@ lint: gem
test: gem setup
@rake test

publish: ${GEM}
publish: ${GEM} ${AUTH}
@echo Publishing package ${NAME}:${VERSION} to ${OWNER} ...
gem push --key github --host ${GPR} ${GEM}
@gem push --key github --host ${GPR} ${GEM}
@echo Done.

clean:
Expand Down

0 comments on commit b2d1411

Please sign in to comment.